Text
class Text
Methods
No description
close unclosed html tags
Convert mixed text/html to text without entities and html This is NOT a replacement for XF->lib->sec
Converts the passed string to UTF8 (auto detects current encoding) Required mbstring PHP Support!
Deocodes the mime declaration in a string and returns a valid UTF-8 string.
Returns a list of umlauts and accent letters with their corresponding normalized letters.
No description
No description
Extracts all hashtags in the given text and returns them as array
Soundex "Like" based on Locale
Convert all applicable characters to HTML entities
checks if the string contains any html tags and returns true if so
Checks if the last character is or isnt a space. (does it the normal way if it is) It explodes the string into an array of seperate words, the effect is... it chops off anything after and including the last space.
Details
at line 19
__construct()
No description
at line 82
string
close_html_tags(string $text)
close unclosed html tags
at line 440
string
convertToPlainText(string $mixedHtmlText)
Convert mixed text/html to text without entities and html This is NOT a replacement for XF->lib->sec
at line 57
string
convert_to_utf8($string)
Converts the passed string to UTF8 (auto detects current encoding) Required mbstring PHP Support!
at line 387
string
decode_from_imap_mime(string $mimeStr, string $inputCharset = 'utf-8', string $targetCharset = 'utf-8', string $fallbackCharset = 'iso-8859-1')
Deocodes the mime declaration in a string and returns a valid UTF-8 string.
Replaces the old imap_mime_header_decode functionality
at line 416
array
getNormalizedLetters()
Returns a list of umlauts and accent letters with their corresponding normalized letters.
at line 32
array
get_diff(string $from_text, string $to_text, string $split_mode = 'words')
No description
at line 45
string
get_diff_render(string $from_text, string $to_text, string $display_changes = 'all', string $split_mode = 'words')
No description
at line 355
array
get_hashtags(string $text_with_hashtags, bool $return_with_hash = false)
Extracts all hashtags in the given text and returns them as array
at line 166
string
get_soundex(mixed $word)
Soundex "Like" based on Locale
at line 98
string
htmlentities(mixed $text, mixed $encode_tags = true, string $text_encoding = 'UTF-8')
Convert all applicable characters to HTML entities
at line 150
bool
is_html(string $string)
checks if the string contains any html tags and returns true if so
at line 124
string
limit_string(string $string, int $charlimit)
Checks if the last character is or isnt a space. (does it the normal way if it is) It explodes the string into an array of seperate words, the effect is... it chops off anything after and including the last space.