java.lang.Object | |
↳ | com.microstrategy.utils.NumberParser |
This class is intended to parse a string into a number based on Locale.
Callers of this class should not pass in null
String,
otherwise java.lang.NullPointerException is thrown.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NumberParser() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static boolean |
isNumber(String str, Locale locale)
Returns true if the string is a number in the specified locale.
| ||||||||||
static String |
stripWhiteSpaces(String str, Locale locale)
Strip off the white space characters within the string if the locale is French
or Swedish only, otherwise returns the original string.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns true if the string is a number in the specified locale. In case of French and Swedish language, all the white space characters contained within the string are ignored. In other languages, keep the string as is when parsing.
str | the string to parse |
---|---|
locale | the java.lang.Locale |
Strip off the white space characters within the string if the locale is French or Swedish only, otherwise returns the original string.
str | the string whose white space characters needs to be stripped |
---|---|
locale | the java.util.Locale |