Documentation

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
bool

convertToNumberIfFormatted()

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
bool

convertToNumberIfFraction()

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
bool

convertToNumberIfNumeric()

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
bool

convertToNumberIfPercent()

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
bool

currencyMatcherRegexp()

public static currencyMatcherRegexp() : string
Return values
string

        
On this page

Search results