If you have strings that are much longer than the field size, then using a binary algorithm might be faster. Check the string length, if too big, then check the length of 1/2 the string, if too small, then check the length of 3/4 of the string, and so on until you get within a character or two. You could also take the width of a medium character, such as "n", and use that to get you to within a couple of chars of the correct length.

-- Frank

Web Photos Pro: Software for Photo Bloggers and Other Photo Power Users
See us on the web at http://www.webphotospro.com/

On Dec 26, 2004, at 5:00 PM, [EMAIL PROTECTED] wrote:

From: Chipp Walters <[EMAIL PROTECTED]>
Subject: Re: function to calculate string length...
To: [EMAIL PROTECTED],  How to use Revolution
        <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Well, I cobbled this together from some of the archives...
Anyone see an obvious place to optimize?

_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to