# TextUtils Class Reference
[Various accompanying utilities]

Inheritance diagram for TextUtils:
[legend]

List of all members.

## Static Public Member Functions

static | friendlyFileSize ($size, $precision=2, $units=array(null, 'k', 'M', 'G', 'T', 'P'), $spacePunctuation=false)
static | getRootFromUrl ($url)
static | getPathFromUrl ($url)
static | urlSafeBase64Encode ($string)
static | urlSafeBase64Decode ($string)
static | upFirst ($string)
static | downFirst ($string)
static | cutOnSpace ($string, $length, $append=null)
static | normalizeUri ($uri)
static | hex2Binary ($hex)
static | safeAmp ($text)
static | friendlyNumber ($number, $delimiter= ' ')

## Detailed Description

Definition at line 19 of file TextUtils.class.php.

## Member Function Documentation

static TextUtils::cutOnSpace | ( | $ | string,
|  | $ | length,
|  | $ | append = `null` |
| ) |  |  | `[static]`

Definition at line 103 of file TextUtils.class.php.

static TextUtils::downFirst | ( | $ | string | ) | `[static]`

Definition at line 96 of file TextUtils.class.php.

Referenced by ControllersCollection::handleRequest().

static TextUtils::friendlyFileSize | ( | $ | size,
|  | $ | precision = `2`,
|  | $ | units = `array(null, 'k' , 'M', 'G', 'T', 'P')`,
|  | $ | spacePunctuation = `false` |
| ) |  |  | `[static]`

Definition at line 21 of file TextUtils.class.php.

static TextUtils::friendlyNumber | ( | $ | number,
|  | $ | delimiter = `' '` |
| ) |  |  | `[static]`

Definition at line 162 of file TextUtils.class.php.

static TextUtils::getPathFromUrl | ( | $ | url | ) | `[static]`

Definition at line 52 of file TextUtils.class.php.

static TextUtils::getRootFromUrl | ( | $ | url | ) | `[static]`

Definition at line 39 of file TextUtils.class.php.

static TextUtils::hex2Binary | ( | $ | hex | ) | `[static]`

Definition at line 128 of file TextUtils.class.php.

References Assert::isEqual().

Here is the call graph for this function:

static TextUtils::normalizeUri | ( | $ | uri | ) | `[static]`

Deprecated:
  by GenericUri::normalize

Definition at line 120 of file TextUtils.class.php.

References GenericUri::create().

Here is the call graph for this function:

static TextUtils::safeAmp | ( | $ | text | ) | `[static]`

See also:
  http://www.w3.org/TR/REC-html40/charset.html#entities
  http://www.w3.org/TR/REC-html40/sgml/entities.html
  http://php.net/htmlentities

htmlentities() do not support hexadecimal numeric character references yet.

Definition at line 150 of file TextUtils.class.php.

static TextUtils::upFirst | ( | $ | string | ) | `[static]`

Definition at line 89 of file TextUtils.class.php.

static TextUtils::urlSafeBase64Decode | ( | $ | string | ) | `[static]`

Definition at line 72 of file TextUtils.class.php.

static TextUtils::urlSafeBase64Encode | ( | $ | string | ) | `[static]`

Definition at line 62 of file TextUtils.class.php.

The documentation for this class was generated from the following file:

- main/Utils/TextUtils.class.php