Bitrix Site Manager

Strings and text

The following functions are used with strings and text.

FunctionDescription
TxtToHTML Converts plain text to HTML formatted text.
HTMLToTxt Converts the original HTML code to plain text by deleting tags or replacing them with the equivalent text format.
TruncateText Truncates the specified string to the maximum length of max_length. If a string is truncated, ellipsis are added.
InsertSpaces Splits long words in a text. Returns the text containing words of the specified length.
RandString Returns a string of the specified length consisting of random symbols.
ToUpper Converts symbols of the original string to uppercase.
ToLower Converts the symbols of the original string to lowercase.
htmlspecialcharsEx Converts text to HTML safe format, replacing special symbols with the corresponding HTML entities.
htmlspecialcharsBack Converts text from HTML safe format to the human-readable form.
utf8win1251 Converts a string from UTF-8 to Windows-1251.