LSParseNumber()
Converts a string that is a valid numeric representation in the current locale into a formatted number.
LSParseNumber( number=string, locale=locale );
Returns: Number
| Argument | Description |
|---|---|
|
number
string,
required
|
edit
A string or a variable that contains one Alias: string |
|
locale
locale,
optional
|
edit
Locale to use instead of the locale of the page when processing the function |
Examples
edit writeOutput(lsParseNumber("25,000") & "<br>");
writeOutput(lsParseNumber("0012.456") & "<br>");
writeOutput(lsParseNumber(numberFormat(35,'000.00')) & "<br>");
writeOutput(lsParseNumber(01123) & "<br>");
writeOutput(lsParseNumber(23000) & "<br>");
See also
- Numbers
- Strings
- Parsing
- Internationalization
- ParseNumber()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)