Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 254 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Text:: (10 methods):
  length()
  exact()
  test()
  split()
  applyPadding()
  buildDelimiter()
  matchFlags()
  fromArray()
  formatValueMode0()
  formatValueMode1()


Class: Text  - X-Ref

length($value = '')   X-Ref
LEN.

param: mixed $value String Value
return: array|int

exact($value1, $value2)   X-Ref
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.

param: mixed $value1 String Value
param: mixed $value2 String Value
return: array|bool

test($testValue = '')   X-Ref
RETURNSTRING.

param: mixed $testValue Value to check
return: null|array|string

split($text, $columnDelimiter = null, $rowDelimiter = null, bool $ignoreEmpty = false, bool $matchMode = true, $padding = ')   X-Ref
TEXTSPLIT.

param: mixed $text the text that you're searching
param: null|array|string $columnDelimiter The text that marks the point where to spill the text across columns.
param: null|array|string $rowDelimiter The text that marks the point where to spill the text down rows.
param: bool $ignoreEmpty Specify FALSE to create an empty cell when two delimiters are consecutive.
param: bool $matchMode Determines whether the match is case-sensitive or not.
param: mixed $padding The value with which to pad the result.
return: array the array built from the text, split by the row and column delimiters

applyPadding(array $rows, $padding)   X-Ref
No description

buildDelimiter($delimiter)   X-Ref
No description

matchFlags(bool $matchMode)   X-Ref
No description

fromArray(array $array, int $format = 0)   X-Ref
No description

formatValueMode0($cellValue)   X-Ref

param: mixed $cellValue

formatValueMode1($cellValue)   X-Ref

param: mixed $cellValue