HOME
NEWS
REVIEWS
FEATURES
FILES
FORUMS
Philips Pronto Professional Forum - View Post
Find remotes at:
Read more news »
Acoustic Research Xsight Touch ARRX18G
Sony PlayStation 3 Advanced Control Roundup
Pinnacle PCTV HD Pro Stick HDTV Tuner
Universal Remote Control Inc. Digital R50
[
SEARCH
]
[
CONTACT
]
The following page was printed from RemoteCentral.com:
Forums
>
Professional
>
Philips Pronto Professional
View Single Message
Login:
Pass:
Register
Forum Search
Login
Original thread:
Changing an integer to an minimum length
Post 23
made on
Sunday October 10, 2010
at
19:03
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,007
View Profile
I know it has been a while but I was going through some of my source code and found where I'd changed this up a bit.
Here is way to do this with least amount of code - Use String.slice() with negative parameter value.
function zeroFill3(value){
return String('000' + value).slice(-3);
}
I know it has been a while but I was going through some of my source code and found where I'd changed this up a bit. Here is way to do this with least amount of code - Use String.slice() with negative parameter value. function zeroFill3(value){ return String('000' + value).slice(-3); }
Lyndel McGee
Philips Pronto Addict/Beta Tester
View Code
View Normal
View the original thread...
©1998-2024, Daniel Tonks. All rights reserved.
Contact
|
Advertise
Home
|
News
|
Reviews
|
Features
|
Files
|
Forums
|
Search