[jawsscripts] Re: padding integers
- From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
- To: jawsscripts@xxxxxxxxxxxxx
- Date: Sat, 21 Feb 2009 14:22:35 -0500
Try this:
let x = formatString("0%1", intToString(3))
On Sat, Feb 21, 2009 at 06:58:52PM -0000, Sean Randall wrote:
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
--
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________
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: