FormattedNumber
in package
Table of Contents
Methods
- convertToNumberIfCurrency() : bool
- Identify whether a string contains a currency value, and if so, convert it to a numeric.
- convertToNumberIfFormatted() : bool
- Identify whether a string contains a formatted numeric value, and convert it to a numeric if it is.
- convertToNumberIfFraction() : bool
- Identify whether a string contains a fractional numeric value, and convert it to a numeric if it is.
- convertToNumberIfNumeric() : bool
- Identify whether a string contains a numeric value, and convert it to a numeric if it is.
- convertToNumberIfPercent() : bool
- Identify whether a string contains a percentage, and if so, convert it to a numeric.
- currencyMatcherRegexp() : string
Methods
convertToNumberIfCurrency()
Identify whether a string contains a currency value, and if so, convert it to a numeric.
public
static convertToNumberIfCurrency(float|string &$operand) : bool
Parameters
- $operand : float|string
-
string value to test
Return values
boolconvertToNumberIfFormatted()
Identify whether a string contains a formatted numeric value, and convert it to a numeric if it is.
public
static convertToNumberIfFormatted(float|string &$operand) : bool
Parameters
- $operand : float|string
-
string value to test
Return values
boolconvertToNumberIfFraction()
Identify whether a string contains a fractional numeric value, and convert it to a numeric if it is.
public
static convertToNumberIfFraction(string &$operand) : bool
Parameters
- $operand : string
-
string value to test
Return values
boolconvertToNumberIfNumeric()
Identify whether a string contains a numeric value, and convert it to a numeric if it is.
public
static convertToNumberIfNumeric(float|string &$operand) : bool
Parameters
- $operand : float|string
-
string value to test
Return values
boolconvertToNumberIfPercent()
Identify whether a string contains a percentage, and if so, convert it to a numeric.
public
static convertToNumberIfPercent(float|string &$operand) : bool
Parameters
- $operand : float|string
-
string value to test
Return values
boolcurrencyMatcherRegexp()
public
static currencyMatcherRegexp() : string