1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс StringHelper

Открытые статические члены

static getLength ($str, $encoding=null)
static getSubstring ($str, $start, $length, $encoding=null)
static getPosition ($haystack, $needle, $offset=0, $encoding=null)
static changeCaseToLower ($str)
static changeCaseToUpper ($str)
static htmlSpecialChars ($string, $flags=ENT_COMPAT, $encoding=null)
static validateUtf8OctetSequences ($string)
static escapePhp ($str, $enclosure='"', $additional = '')
static unescapePhp ($str, $enclosure='"')
static hasPhpTokens ($str, $enclosure='"')

Поля данных

const UTF8_REGEXP

Подробное описание

См. также
\Bitrix\Main\Text

См. определение в файле stringhelper.php строка 12

Методы

◆ changeCaseToLower()

changeCaseToLower ( $str)
static

Special version of strtolower.

Аргументы
string$strString to convert.
Возвращает
string

См. определение в файле stringhelper.php строка 95

◆ changeCaseToUpper()

changeCaseToUpper ( $str)
static

Special version of strtoupper.

Аргументы
string$strString to convert.
Возвращает
string

См. определение в файле stringhelper.php строка 105

◆ escapePhp()

escapePhp ( $str,
$enclosure = '"',
$additional = '' )
static

Escapes symbols of "'$ in given string. @param string $str String to escape. @param string $enclosure Enclosure symbol " or ' and <<< for heredoc syntax.

Аргументы
string$additionalAdditional symbols to escape.
Возвращает
string

См. определение в файле stringhelper.php строка 150

◆ getLength()

getLength ( $str,
$encoding = null )
static

Special version of strlen.

Аргументы
string$strString to measure.
string$encodingDefines encoding used in conversion.
Возвращает
int

См. определение в файле stringhelper.php строка 32

◆ getPosition()

getPosition ( $haystack,
$needle,
$offset = 0,
$encoding = null )
static

Special version of strpos.

Аргументы
string$haystackString to analyze.
string$needleString to find.
int$offsetThe search offset.
string$encodingDefines encoding used in conversion.
Возвращает
bool|int

См. определение в файле stringhelper.php строка 76

◆ getSubstring()

getSubstring ( $str,
$start,
$length,
$encoding = null )
static

Special version of substr.

Аргументы
string$strString to convert.
int$startStarting position.
int$lengthCount characters to extract.
string$encodingDefines encoding used in conversion.
Возвращает
string

См. определение в файле stringhelper.php строка 54

◆ hasPhpTokens()

hasPhpTokens ( $str,
$enclosure = '"' )
static

Validate phrase for php tokens.

Аргументы
string$str
string$enclosure
Возвращает
bool

См. определение в файле stringhelper.php строка 215

◆ htmlSpecialChars()

htmlSpecialChars ( $string,
$flags = ENT_COMPAT,
$encoding = null )
static

Convert special characters to HTML entities.

Аргументы
string$stringThe string being converted.
int$flagsA bitmask mask which specify how to handle quotes.
string$encodingDefines encoding used in conversion.
Возвращает
string

См. определение в файле stringhelper.php строка 117

◆ unescapePhp()

unescapePhp ( $str,
$enclosure = '"' )
static

Removes escape symbols in given string.

Аргументы
string$strString to unescape.
string$enclosureEnclosure symbol " or '.
Возвращает
string

См. определение в файле stringhelper.php строка 190

◆ validateUtf8OctetSequences()

validateUtf8OctetSequences ( $string)
static

Validates UTF-8 octet sequences: 0xxxxxxx 110xxxxx 10xxxxxx 1110xxxx 10xxxxxx 10xxxxxx 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx

Аргументы
string$string
Возвращает
bool

См. определение в файле stringhelper.php строка 136

Поля

◆ UTF8_REGEXP

const UTF8_REGEXP
Инициализатор
= '/(?:
[\x09\x0A\x0D\x20-\x7E] # ASCII
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
| \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
)+/xs'

См. определение в файле stringhelper.php строка 15


Объявления и описания членов класса находятся в файле: