Properties

$invalidChars

$invalidChars

Methods

CHARACTER()

CHARACTER(string  $character) : string

CHARACTER.

Parameters

string $character

Value

Returns

string —

TRIMNONPRINTABLE()

TRIMNONPRINTABLE(mixed  $stringValue = '') : string

TRIMNONPRINTABLE.

Parameters

mixed $stringValue

Value to check

Returns

string —

TRIMSPACES()

TRIMSPACES(mixed  $stringValue = '') : string

TRIMSPACES.

Parameters

mixed $stringValue

Value to check

Returns

string —

ASCIICODE()

ASCIICODE(string  $characters) : int|string

ASCIICODE.

Parameters

string $characters

Value

Returns

int|string —

A string if arguments are invalid

CONCATENATE()

CONCATENATE(mixed  ...$args) : string

CONCATENATE.

Parameters

mixed $args variadic

Returns

string —

DOLLAR()

DOLLAR(float  $value, int  $decimals = 2) : string

DOLLAR.

This function converts a number to text using currency format, with the decimals rounded to the specified place. The format used is $#,##0.00_);($#,##0.00)..

Parameters

float $value

The value to format

int $decimals

The number of digits to display to the right of the decimal point. If decimals is negative, number is rounded to the left of the decimal point. If you omit decimals, it is assumed to be 2

Returns

string —

SEARCHSENSITIVE()

SEARCHSENSITIVE(string  $needle, string  $haystack, int  $offset = 1) : string

SEARCHSENSITIVE.

Parameters

string $needle

The string to look for

string $haystack

The string in which to look

int $offset

Offset within $haystack

Returns

string —

SEARCHINSENSITIVE()

SEARCHINSENSITIVE(string  $needle, string  $haystack, int  $offset = 1) : string

SEARCHINSENSITIVE.

Parameters

string $needle

The string to look for

string $haystack

The string in which to look

int $offset

Offset within $haystack

Returns

string —

FIXEDFORMAT()

FIXEDFORMAT(mixed  $value, int  $decimals = 2, bool  $no_commas = false) : string

FIXEDFORMAT.

Parameters

mixed $value

Value to check

int $decimals
bool $no_commas

Returns

string —

LEFT()

LEFT(string  $value = '', int  $chars = 1) : string

LEFT.

Parameters

string $value

Value

int $chars

Number of characters

Returns

string —

MID()

MID(string  $value = '', int  $start = 1, int  $chars = null) : string

MID.

Parameters

string $value

Value

int $start

Start character

int $chars

Number of characters

Returns

string —

RIGHT()

RIGHT(string  $value = '', int  $chars = 1) : string

RIGHT.

Parameters

string $value

Value

int $chars

Number of characters

Returns

string —

STRINGLENGTH()

STRINGLENGTH(string  $value = '') : int

STRINGLENGTH.

Parameters

string $value

Value

Returns

int —

LOWERCASE()

LOWERCASE(string  $mixedCaseString) : string

LOWERCASE.

Converts a string value to upper case.

Parameters

string $mixedCaseString

Returns

string —

UPPERCASE()

UPPERCASE(string  $mixedCaseString) : string

UPPERCASE.

Converts a string value to upper case.

Parameters

string $mixedCaseString

Returns

string —

PROPERCASE()

PROPERCASE(string  $mixedCaseString) : string

PROPERCASE.

Converts a string value to upper case.

Parameters

string $mixedCaseString

Returns

string —

REPLACE()

REPLACE(string  $oldText, int  $start, int  $chars, string  $newText) : string

REPLACE.

Parameters

string $oldText

String to modify

int $start

Start character

int $chars

Number of characters

string $newText

String to replace in defined position

Returns

string —

SUBSTITUTE()

SUBSTITUTE(string  $text = '', string  $fromText = '', string  $toText = '', int  $instance) : string

SUBSTITUTE.

Parameters

string $text

Value

string $fromText

From Value

string $toText

To Value

int $instance

Instance Number

Returns

string —

RETURNSTRING()

RETURNSTRING(mixed  $testValue = '') : null|string

RETURNSTRING.

Parameters

mixed $testValue

Value to check

Returns

null|string —

TEXTFORMAT()

TEXTFORMAT(mixed  $value, string  $format) : string

TEXTFORMAT.

Parameters

mixed $value

Value to check

string $format

Format mask to use

Returns

string —

VALUE()

VALUE(mixed  $value = '') : \DateTimeInterface|float|int|string

VALUE.

Parameters

mixed $value

Value to check

Returns

\DateTimeInterface|float|int|string —

A string if arguments are invalid

NUMBERVALUE()

NUMBERVALUE(mixed  $value = '', string  $decimalSeparator = null, string  $groupSeparator = null) : float|string

NUMBERVALUE.

Parameters

mixed $value

Value to check

string $decimalSeparator

decimal separator, defaults to locale defined value

string $groupSeparator

group/thosands separator, defaults to locale defined value

Returns

float|string —

EXACT()

EXACT( $value1,  $value2) : bool

Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise.

EXACT is case-sensitive but ignores formatting differences. Use EXACT to test text being entered into a document.

Parameters

$value1
$value2

Returns

bool —

TEXTJOIN()

TEXTJOIN(mixed  $delimiter, mixed  $ignoreEmpty, mixed  ...$args) : string

TEXTJOIN.

Parameters

mixed $delimiter
mixed $ignoreEmpty
mixed $args variadic

Returns

string —

builtinREPT()

builtinREPT(string  $str, mixed  $number) : string

REPT.

Returns the result of builtin function round after validating args.

Parameters

string $str

Should be numeric

mixed $number

Should be int

Returns

string —

unicodeToOrd()

unicodeToOrd(mixed  $character) : mixed

Parameters

mixed $character

Returns

mixed —

convertBooleanValue()

convertBooleanValue(mixed  $value) : mixed

Parameters

mixed $value

Returns

mixed —