CSNumberFormat
in package
This class defines a helper object for the number formats.
It provides getter methods to receive the information about the separators for the given number format.
Tags
Table of Contents
- createNumberFormat() : CSNumberFormat
- Creates the number format object for a given number format string.
- getDecimalSeparator() : string
- Returns the decimal separator of the number format.
- getDecimalSeparatorLabel() : string
- Returns the label of the decimal separator
- getNumberFormat() : string
- Returns the number format string.
- getRegex() : string
- Returns the regex matching the current number format.
- getThousandSeparator() : string
- Returns the thousand separator of the number format.
- getThousandSeparatorLabel() : string
- Returns the label of the thousand separator.
Methods
createNumberFormat()
Creates the number format object for a given number format string.
public
static createNumberFormat(string $sNumberFormat) : CSNumberFormat
Parameters
- $sNumberFormat : string
-
The target number format.
Tags
Return values
CSNumberFormat —getDecimalSeparator()
Returns the decimal separator of the number format.
public
getDecimalSeparator() : string
Tags
Return values
string —getDecimalSeparatorLabel()
Returns the label of the decimal separator
public
getDecimalSeparatorLabel(int $iLanguageId) : string
Parameters
- $iLanguageId : int
-
The target language of the label.
Tags
Return values
string —getNumberFormat()
Returns the number format string.
public
getNumberFormat() : string
Tags
Return values
string —with the number format.
getRegex()
Returns the regex matching the current number format.
public
getRegex() : string
Tags
Return values
string —The regex matching the current number format.
getThousandSeparator()
Returns the thousand separator of the number format.
public
getThousandSeparator() : string
Tags
Return values
string —getThousandSeparatorLabel()
Returns the label of the thousand separator.
public
getThousandSeparatorLabel(int $iLanguageId) : string
Parameters
- $iLanguageId : int
-
The target language of the label.
