Documentation

TextData

Table of Contents

$invalidChars
unicodeToOrd() mixed
CHARACTER() CHARACTER. string
TRIMNONPRINTABLE() TRIMNONPRINTABLE. string
TRIMSPACES() TRIMSPACES. string
convertBooleanValue() mixed
ASCIICODE() ASCIICODE. int|string
CONCATENATE() CONCATENATE. string
DOLLAR() DOLLAR. string
SEARCHSENSITIVE() SEARCHSENSITIVE. string
SEARCHINSENSITIVE() SEARCHINSENSITIVE. string
FIXEDFORMAT() FIXEDFORMAT. string
LEFT() LEFT. string
MID() MID. string
RIGHT() RIGHT. string
STRINGLENGTH() STRINGLENGTH. int
LOWERCASE() LOWERCASE. string
UPPERCASE() UPPERCASE. string
PROPERCASE() PROPERCASE. string
REPLACE() REPLACE. string
SUBSTITUTE() SUBSTITUTE. string
RETURNSTRING() RETURNSTRING. null|string
TEXTFORMAT() TEXTFORMAT. string
VALUE() VALUE. DateTimeInterface|float|int|string
NUMBERVALUE() NUMBERVALUE. float|string
EXACT() Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise. bool
TEXTJOIN() TEXTJOIN. string
builtinREPT() REPT. string

Properties

$invalidChars

private static mixed $invalidChars

Methods

unicodeToOrd()

private static unicodeToOrd( $character : mixed ) : mixed
Parameters
$character : mixed
Return values
mixed

CHARACTER()

CHARACTER.

public static CHARACTER( $character : string ) : string
Parameters
$character : string

Value

Return values
string

TRIMNONPRINTABLE()

TRIMNONPRINTABLE.

public static TRIMNONPRINTABLE( [ $stringValue : mixed = '' ] ) : string
Parameters
$stringValue : mixed = ''

Value to check

Return values
string

TRIMSPACES()

TRIMSPACES.

public static TRIMSPACES( [ $stringValue : mixed = '' ] ) : string
Parameters
$stringValue : mixed = ''

Value to check

Return values
string

convertBooleanValue()

private static convertBooleanValue( $value : mixed ) : mixed
Parameters
$value : mixed
Return values
mixed

ASCIICODE()

ASCIICODE.

public static ASCIICODE( $characters : string ) : int|string
Parameters
$characters : string

Value

Return values
int|string —

A string if arguments are invalid

CONCATENATE()

CONCATENATE.

public static CONCATENATE( ...$args : mixed ) : string
Parameters
$args : mixed
Return values
string

DOLLAR()

DOLLAR.

public static DOLLAR( $value : float [, $decimals : int = 2 ] ) : string

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
$value : float

The value to format

$decimals : int = 2

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

Return values
string

SEARCHSENSITIVE()

SEARCHSENSITIVE.

public static SEARCHSENSITIVE( $needle : string , $haystack : string [, $offset : int = 1 ] ) : string
Parameters
$needle : string

The string to look for

$haystack : string

The string in which to look

$offset : int = 1

Offset within $haystack

Return values
string

SEARCHINSENSITIVE()

SEARCHINSENSITIVE.

public static SEARCHINSENSITIVE( $needle : string , $haystack : string [, $offset : int = 1 ] ) : string
Parameters
$needle : string

The string to look for

$haystack : string

The string in which to look

$offset : int = 1

Offset within $haystack

Return values
string

FIXEDFORMAT()

FIXEDFORMAT.

public static FIXEDFORMAT( $value : mixed [, $decimals : int = 2 ] [, $no_commas : bool = false ] ) : string
Parameters
$value : mixed

Value to check

$decimals : int = 2
$no_commas : bool = false
Return values
string

LEFT()

LEFT.

public static LEFT( [ $value : string = '' ] [, $chars : int = 1 ] ) : string
Parameters
$value : string = ''

Value

$chars : int = 1

Number of characters

Return values
string

MID()

MID.

public static MID( [ $value : string = '' ] [, $start : int = 1 ] [, $chars : int = null ] ) : string
Parameters
$value : string = ''

Value

$start : int = 1

Start character

$chars : int = null

Number of characters

Return values
string

RIGHT()

RIGHT.

public static RIGHT( [ $value : string = '' ] [, $chars : int = 1 ] ) : string
Parameters
$value : string = ''

Value

$chars : int = 1

Number of characters

Return values
string

STRINGLENGTH()

STRINGLENGTH.

public static STRINGLENGTH( [ $value : string = '' ] ) : int
Parameters
$value : string = ''

Value

Return values
int

LOWERCASE()

LOWERCASE.

public static LOWERCASE( $mixedCaseString : string ) : string

Converts a string value to upper case.

Parameters
$mixedCaseString : string
Return values
string

UPPERCASE()

UPPERCASE.

public static UPPERCASE( $mixedCaseString : string ) : string

Converts a string value to upper case.

Parameters
$mixedCaseString : string
Return values
string

PROPERCASE()

PROPERCASE.

public static PROPERCASE( $mixedCaseString : string ) : string

Converts a string value to upper case.

Parameters
$mixedCaseString : string
Return values
string

REPLACE()

REPLACE.

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

String to modify

$start : int

Start character

$chars : int

Number of characters

$newText : string

String to replace in defined position

Return values
string

SUBSTITUTE()

SUBSTITUTE.

public static SUBSTITUTE( [ $text : string = '' ] [, $fromText : string = '' ] [, $toText : string = '' ] , $instance : int ) : string
Parameters
$text : string = ''

Value

$fromText : string = ''

From Value

$toText : string = ''

To Value

$instance : int

Instance Number

Return values
string

RETURNSTRING()

RETURNSTRING.

public static RETURNSTRING( [ $testValue : mixed = '' ] ) : null|string
Parameters
$testValue : mixed = ''

Value to check

Return values
null|string

TEXTFORMAT()

TEXTFORMAT.

public static TEXTFORMAT( $value : mixed , $format : string ) : string
Parameters
$value : mixed

Value to check

$format : string

Format mask to use

Return values
string

VALUE()

VALUE.

public static VALUE( [ $value : mixed = '' ] ) : DateTimeInterface|float|int|string
Parameters
$value : mixed = ''

Value to check

Return values
DateTimeInterface|float|int|string —

A string if arguments are invalid

NUMBERVALUE()

NUMBERVALUE.

public static NUMBERVALUE( [ $value : mixed = '' ] [, $decimalSeparator : string = null ] [, $groupSeparator : string = null ] ) : float|string
Parameters
$value : mixed = ''

Value to check

$decimalSeparator : string = null

decimal separator, defaults to locale defined value

$groupSeparator : string = null

group/thosands separator, defaults to locale defined value

Return values
float|string

EXACT()

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

public static EXACT( $value1 : , $value2 : ) : bool

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

Parameters
$value1 :
$value2 :
Return values
bool

TEXTJOIN()

TEXTJOIN.

public static TEXTJOIN( $delimiter : mixed , $ignoreEmpty : mixed , ...$args : mixed ) : string
Parameters
$delimiter : mixed
$ignoreEmpty : mixed
$args : mixed
Return values
string

builtinREPT()

REPT.

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

Returns the result of builtin function round after validating args.

Parameters
$str : string

Should be numeric

$number : mixed

Should be int

Return values
string

Search results