ascii_to_entities (line
111)
High ASCII to Entities
Converts High ascii text and MS Word special characters to character entities
string
ascii_to_entities
(string $str)
character_limiter (line
73)
Character Limiter
Limits the string based on the character count. Preserves complete words so the character count may not be exactly as specified.
string
character_limiter
(string $str, [integer $n = 500], [string $end_char = '…'])
-
string
$str
-
integer
$n
-
string
$end_char: the end character. Usually an ellipsis
entities_to_ascii (line
162)
Entities to ASCII
Converts character entities back to ASCII
string
entities_to_ascii
(string $str, [bool $all = TRUE])
highlight_code (line
256)
Code Highlighter
Colorizes code strings
string
highlight_code
(string $str)
-
string
$str: the text string
highlight_phrase (line
313)
Phrase Highlighter
Highlights a phrase within a text string
string
highlight_phrase
(string $str, string $phrase, [string $tag_open = '<strong>'], [string $tag_close = '</strong>'])
-
string
$str: the text string
-
string
$phrase: the phrase you'd like to highlight
-
string
$tag_open: the openging tag to precede the phrase with
-
string
$tag_close: the closing tag to end the phrase with
wordwrap_utf8 (line
448)
Word Wrap UTF8
Esta funcion es identica a la funcion PHP wordwrap pero permite hacer. los cortes en UTF8.
El parametro $cCorte es la cadena de corte que se pone al final de cada linea. El parametro $nCorte indica si se debe forzar el corte de linea aun cuando quede una cadena cortada por la mitad.
string
wordwrap_utf8
(string $cCadena, int $nLongitud, [string $cCorte = '<br />'], [int $nCorte = 1])
-
string
$cCadena
-
int
$nLongitud
-
string
$cCorte
-
int
$nCorte
word_censor (line
220)
Word Censoring Function
Supply a string and an array of disallowed words and any matched words will be converted to #### or to the replacement word you've submitted.
string
word_censor
(string $str, string $censored, [string $replacement = ''])
-
string
$str: the text string
-
string
$censored: the array of censoered words
-
string
$replacement: the optional replacement value
word_limiter (line
40)
Word Limiter
Limits a string to X number of words.
string
word_limiter
(string $str, [integer $limit = 100], [string $end_char = '&#8230;'])
-
string
$str
-
integer
$limit
-
string
$end_char: the end character. Usually an ellipsis
word_wrap (line
344)
Word Wrap
Wraps text at the specified character. Maintains the integrity of words. Anything placed between {unwrap}{/unwrap} will not be word wrapped, nor will URLs.
string
word_wrap
(string $str, [integer $charlim = '76'])
-
string
$str: the text string
-
integer
$charlim: the number of characters to wrap at