Class

TextHelper

Package: helper Author: Régis Viarre <crowkait@phpboost.com> Desc: Text helper Located at helper/TextHelper.class.php
Methods summary
public static string
# strprotect( string $var, boolean $html_protect = TextHelper::HTML_PROTECT, integer $addslashes = TextHelper::ADDSLASHES_FORCE )
public static string
# wordwrap_html( string $str, integer $lenght, string $cut_char = '<br />', boolean $cut = true )
public static string
# substr_html( string $str, integer $start, integer $end = '' )
public static string
# cut_string( string $string, integer $length )
public static string
# to_js_string( string $string, string $add_quotes = true )
public static string
# to_json_string( string $string, string $add_quotes = true )
public static
# htmlspecialchars( mixed $string, mixed $flags = null, mixed $encoding = 'UTF-8', mixed $double_encode = true )
public static
# htmlspecialchars_decode( mixed $string, mixed $flags = null )
public static
# html_entity_decode( mixed $string, mixed $flags = null, mixed $encoding = 'UTF-8' )
public static
# strtolower( mixed $string )
public static
# strtoupper( mixed $string )
public static
# lcfirst( mixed $string )
public static
# ucfirst( mixed $string )
public static
# strlen( mixed $string )
public static
# strpos( mixed $string, mixed $substring, mixed $offset = '' )
public static
# stripos( mixed $string, mixed $substring, mixed $offset = '' )
public static
# substr( mixed $string, mixed $start, mixed $length = '' )
public static
# mb_substr( mixed $string, mixed $start, mixed $length = '' )
public static
# strrchr( mixed $string, mixed $needle )
public static
# strripos( mixed $string, mixed $needle, mixed $offset = '' )
public static
# strrpos( mixed $string, mixed $needle, mixed $offset = '' )
public static
# strstr( mixed $string, mixed $needle, mixed $before_needle = '' )
public static
# substr_count( mixed $string, mixed $needle, mixed $encoding = '' )
public static
# convert_case( mixed $string, mixed $mode, mixed $encoding = '' )
public static
# serialize( mixed $string )
public static
# unserialize( mixed $string )
public static string
# utf8_wordwrap( string $string, integer $width = 75, string $break = "\n", string $cut = true )

Wraps a UTF-8 string to a given number of characters

Constants summary
boolean HTML_NO_PROTECT false
#
boolean HTML_PROTECT true
#
integer ADDSLASHES_FORCE 1
#
integer ADDSLASHES_NONE 2
#