[jawsscripts] Re: padding integers

Precede your string with space or another blank-type character that
doesn't speak. If you wish to concatenate your newly padded integer,
add and chop the non-integer from s during the s+x operation.
Example:
let s = stringChopLeft(" "+s, 1)+intToString(x)

Original message
from: "Sean Randall" <seanr@xxxxxxxxxxxxxxx>
subject: [jawsscripts] padding integers
date: Sat, 21 Feb 2009 18:58:52 -0000

>Hi all,
>
>Can anybody shed any light on a problem I am having?
>
> I want to get a string from an integer, but pad it with a leading 0.
>therefore, when a script has:
>sayString("0"+intToString(3))
>I expect to hear "03".
>
>The only solution I've found is to do something along the lines of:
>Let x = "0 "+intToString(3)
>Let x = stringReplaceSubstrings(x," ","")
>
>Seems remarkably cludgy to me.  Am I missing a concatenation operator?
>
>Any takers?
>Sean.
>"Everything is funny as long as it is happening to Somebody Else." Will
>Rogers
>
>__________ 
>Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
>View the list's information and change your settings at 
>http://www.freelists.org/list/jawsscripts

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: