Documentation

Text
in package
Uses ArrayEnabled

Table of Contents

Properties

$arrayArgumentHelper  : ArrayArgumentHelper|null

Methods

exact()  : array<string|int, mixed>|bool
Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise.
fromArray()  : string
length()  : array<string|int, mixed>|int
LEN.
split()  : array<string|int, mixed>
TEXTSPLIT.
test()  : array<string|int, mixed>|string
T.
evaluateArrayArguments()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.
evaluateArrayArgumentsIgnore()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.
evaluateArrayArgumentsSubset()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.
evaluateArrayArgumentsSubsetFrom()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.
evaluateSingleArgumentArray()  : array<string|int, mixed>
Handles array argument processing when the function accepts a single argument that can be an array argument.
applyPadding()  : array<string|int, mixed>
buildDelimiter()  : string
formatValueMode0()  : string
formatValueMode1()  : string
initialiseHelper()  : void
matchFlags()  : string
testFalse()  : bool

Properties

Methods

exact()

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

public static exact(mixed $value1, mixed $value2) : array<string|int, mixed>|bool

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

Parameters
$value1 : mixed

String Value Or can be an array of values

$value2 : mixed

String Value Or can be an array of values

Return values
array<string|int, mixed>|bool

If an array of values is passed for either of the arguments, then the returned result will also be an array with matching dimensions

fromArray()

public static fromArray(array<string|int, mixed> $array[, int $format = 0 ]) : string
Parameters
$array : array<string|int, mixed>
$format : int = 0
Return values
string

length()

LEN.

public static length([mixed $value = '' ]) : array<string|int, mixed>|int
Parameters
$value : mixed = ''

String Value Or can be an array of values

Return values
array<string|int, mixed>|int

If an array of values is passed for the argument, then the returned result will also be an array with matching dimensions

split()

TEXTSPLIT.

public static split(mixed $text[, null|array<string|int, mixed>|string $columnDelimiter = null ][, null|array<string|int, mixed>|string $rowDelimiter = null ][, bool $ignoreEmpty = false ][, bool $matchMode = true ][, mixed $padding = '#N/A' ]) : array<string|int, mixed>
Parameters
$text : mixed

the text that you're searching

$columnDelimiter : null|array<string|int, mixed>|string = null

The text that marks the point where to spill the text across columns. Multiple delimiters can be passed as an array of string values

$rowDelimiter : null|array<string|int, mixed>|string = null

The text that marks the point where to spill the text down rows. Multiple delimiters can be passed as an array of string values

$ignoreEmpty : bool = false

Specify FALSE to create an empty cell when two delimiters are consecutive. true = create empty cells false = skip empty cells Defaults to TRUE, which creates an empty cell

$matchMode : bool = true

Determines whether the match is case-sensitive or not. true = case-sensitive false = case-insensitive By default, a case-sensitive match is done.

$padding : mixed = '#N/A'

The value with which to pad the result. The default is #N/A.

Return values
array<string|int, mixed>

the array built from the text, split by the row and column delimiters

test()

T.

public static test([mixed $testValue = '' ]) : array<string|int, mixed>|string
Parameters
$testValue : mixed = ''

Value to check Or can be an array of values

Return values
array<string|int, mixed>|string

If an array of values is passed for the argument, then the returned result will also be an array with matching dimensions

evaluateArrayArguments()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.

protected static evaluateArrayArguments(callable $method, mixed ...$arguments) : array<string|int, mixed>

Example use for: ROUND() or DATE().

Parameters
$method : callable
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsIgnore()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.

protected static evaluateArrayArgumentsIgnore(callable $method, int $ignore, mixed ...$arguments) : array<string|int, mixed>

Example use for: HLOOKUP() and VLOOKUP(), where argument 1 is a matrix that needs to be treated as a database rather than as an array argument.

Parameters
$method : callable
$ignore : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubset()

Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.

protected static evaluateArrayArgumentsSubset(callable $method, int $limit, mixed ...$arguments) : array<string|int, mixed>

Example use for: NETWORKDAYS() or CONCATENATE(), where the last argument is a matrix (or a series of values) that need to be treated as a such rather than as an array arguments.

Parameters
$method : callable
$limit : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubsetFrom()

Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.

protected static evaluateArrayArgumentsSubsetFrom(callable $method, int $start, mixed ...$arguments) : array<string|int, mixed>

Example use for: Z.TEST() or INDEX(), where the first argument 1 is a matrix that needs to be treated as a dataset rather than as an array argument.

Parameters
$method : callable
$start : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateSingleArgumentArray()

Handles array argument processing when the function accepts a single argument that can be an array argument.

protected static evaluateSingleArgumentArray(callable $method, array<string|int, mixed> $values) : array<string|int, mixed>

Example use for: DAYOFMONTH() or FACT().

Parameters
$method : callable
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

applyPadding()

private static applyPadding(array<string|int, mixed> $rows, mixed $padding) : array<string|int, mixed>
Parameters
$rows : array<string|int, mixed>
$padding : mixed
Return values
array<string|int, mixed>

buildDelimiter()

private static buildDelimiter(null|array<string|int, mixed>|string $delimiter) : string
Parameters
$delimiter : null|array<string|int, mixed>|string

the text that marks the point before which you want to split Multiple delimiters can be passed as an array of string values

Return values
string

formatValueMode0()

private static formatValueMode0(mixed $cellValue) : string
Parameters
$cellValue : mixed
Return values
string

formatValueMode1()

private static formatValueMode1(mixed $cellValue) : string
Parameters
$cellValue : mixed
Return values
string

initialiseHelper()

private static initialiseHelper(array<string|int, mixed>|false $arguments) : void
Parameters
$arguments : array<string|int, mixed>|false

Can be changed to array for Php8.1+

matchFlags()

private static matchFlags(bool $matchMode) : string
Parameters
$matchMode : bool
Return values
string

testFalse()

private static testFalse(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

        
On this page

Search results