LSIsCurrency()
Determines whether a string is a valid representation of a currency amount in the current locale.
LSIsCurrency( number=string, locale=locale );
Returns: Boolean
| Argument | Description |
|---|---|
|
number
string,
required
|
edit
A currency string Alias: string, currency_number, currency |
|
locale
locale,
optional
|
edit
Locale to use instead of the locale of the page when processing the function |
Examples
edit<cfoutput>
#LSIsCurrency(4.5)#<br>
#LSIsCurrency("$4.50")#<br>
#LSIsCurrency("£4.50", "English (UK)")#
</cfoutput>
See also
- Currency features
- Strings
- Formatting
- Internationalization
- Decision logic
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)