I can assure you those functions do work, but they were mentioned as ideas only; i.e. show you how the textbox and getboundingbox functions (actually getboundingbox is a subroutine) work.
If I understood your question you are looking for the length of the text (in drawing units, not string length). Either route will work (I'd suggest bounding box as it will work on a variety of objects not just text) but I digress.
Have you read the help file for either textbox or getboundingbox?