Method | Description | |
---|---|---|
camelize ( $string, $type = CAMEL_CASE_HEAD_UP ) : string | Transform "handler-class" to "HandlerClass" and "my-op" to "myOp". | |
concatTitleFields ( $fields ) : string | Joins two title string fragments (in $fields) either with a space or a colon. | |
dateformatPHP2JQueryDatepicker ( $phpFormat ) : string | Matches each symbol of PHP strftime format string to jQuery Datepicker widget date format. | |
diff ( $originalString, $editedString ) : array | Calculate the differences between two strings and produce an array with three types of entries: added substrings, deleted substrings and unchanged substrings. | |
encode_mime_header ( $string ) : string | ||
enumerateAlphabetically ( $steps ) : string | Get a letter $steps places after 'A' | |
generateUUID ( ) : string | Create a new UUID (version 4) | |
getHTMLEntities ( ) : string | Return an associative array of named->numeric HTML entities Required to support HTML functions without objects in PHP4/PHP5 From php.net: function.get-html-translation-table.php | |
hasMBString ( ) : boolean | Check if server has the mbstring library. | |
hasPCREUTF8 ( ) : boolean | Check if server supports the PCRE_UTF8 modifier. | |
html2text ( $html ) : string | Convert limited HTML into a string. | |
init ( ) : null | Perform initialization required for the string wrapper library. | |
iterativeExplode ( $delimiters, $input ) : array | Iterate over an array of delimiters and see whether it exists in the given input string. If so, then use it to explode the string into an array. | |
mime_content_type ( $filename, $suggestedExtension = '' ) : string | ||
regexp_grep ( $pattern, $input ) : array | ||
regexp_match ( $pattern, $subject ) : integer | ||
regexp_match_all ( $pattern, $subject, &$matches ) : integer | boolean | ||
regexp_match_get ( $pattern, $subject, &$matches ) : integer | boolean | ||
regexp_quote ( $string, $delimiter = '/' ) : string | ||
regexp_replace ( $pattern, $replacement, $subject, $limit ) : mixed | ||
regexp_replace_callback ( $pattern, $callback, $subject, $limit ) : mixed | ||
regexp_split ( $pattern, $subject, $limit ) : array | ||
stripUnsafeHtml ( $input ) : string | Strip unsafe HTML from the input text. Covers XSS attacks like scripts, onclick(. | |
strlen ( $string ) : integer | ||
strpos ( $haystack, $needle, $offset ) : integer | ||
strrpos ( $haystack, $needle ) : integer | ||
strtolower ( $string ) : string | ||
strtoupper ( $string ) : string | ||
substr ( $string, $start, $length = false ) : string | ||
substr_count ( $haystack, $needle ) : integer | ||
substr_replace ( $string, $replacement, $start, $length = null ) : string | ||
titleCase ( $title ) : string | Convert a string to proper title case | |
trimPunctuation ( $string ) : string | Trim punctuation from a string | |
ucfirst ( $string ) : string | ||
uncamelize ( $string ) : string | Transform "HandlerClass" to "handler-class" and "myOp" to "my-op". | |
utf8_bad_find ( $str ) : string | Locates the first bad byte in a UTF-8 string returning it's byte index in the string | |
utf8_bad_replace ( $str, $replace = '?' ) : string | Replace bad bytes with an alternative character - ASCII character | |
utf8_bad_strip ( $str ) : string | Strips out any bad bytes from a UTF-8 string and returns the rest | |
utf8_compliant ( $str ) : boolean | Tests whether a string complies as UTF-8; faster and less strict than utf8_is_valid see lib/phputf8/utils/validation.php for more details | |
utf8_is_valid ( $str ) : boolean | Detect whether a string contains non-ascii multibyte sequences in the UTF-8 range | |
utf8_normalize ( $str ) : string | Normalize a string in an unknown (non-UTF8) encoding into a valid UTF-8 sequence | |
utf8_strip_ascii_ctrl ( $str ) : string | Replace bad bytes with an alternative character - ASCII character | |
utf8_to_ascii ( $str ) : string | US-ASCII transliterations of Unicode text |
static public concatTitleFields ( $fields ) : string | ||
$fields | array | |
return | string | the joined string |
public dateformatPHP2JQueryDatepicker ( $phpFormat ) : string | ||
$phpFormat | string | |
return | string |
static public encode_mime_header ( $string ) : string | ||
$string | string Input MIME header to encode. | |
return | string | Encoded MIME header. |
static public enumerateAlphabetically ( $steps ) : string | ||
$steps | int | |
return | string | Letter |
public generateUUID ( ) : string | ||
return | string |
static public getHTMLEntities ( ) : string | ||
return | string |
static public hasMBString ( ) : boolean | ||
return | boolean | Returns true iff the server supports mbstring functions. |
static public hasPCREUTF8 ( ) : boolean | ||
return | boolean | True iff the server supports the PCRE_UTF8 modifier. |
static public iterativeExplode ( $delimiters, $input ) : array | ||
$delimiters | array | |
$input | string | |
return | array |
static public mime_content_type ( $filename, $suggestedExtension = '' ) : string | ||
$filename | string Filename to test. | |
$suggestedExtension | string Suggested file extension (used for common misconfigurations) | |
return | string | Detected MIME type |
static public regexp_grep ( $pattern, $input ) : array | ||
$pattern | string Regular expression | |
$input | string Input string | |
return | array |
static public regexp_match ( $pattern, $subject ) : integer | ||
$pattern | string Regular expression | |
$subject | string String to apply regular expression to | |
return | integer |
static public regexp_match_all ( $pattern, $subject, &$matches ) : integer | boolean | ||
$pattern | string Regular expression | |
$subject | string String to apply regular expression to | |
$matches | array Reference to receive matches | |
return | integer | boolean | Returns number of full matches of given subject, or FALSE if an error occurred. |
static public regexp_match_get ( $pattern, $subject, &$matches ) : integer | boolean | ||
$pattern | string Regular expression | |
$subject | string String to apply regular expression to | |
$matches | array Reference to receive matches | |
return | integer | boolean | Returns 1 if the pattern matches given subject, 0 if it does not, or FALSE if an error occurred. |
static public regexp_quote ( $string, $delimiter = '/' ) : string | ||
$string | string String to quote | |
$delimiter | string Delimiter for regular expression | |
return | string | Quoted equivalent of $string |
static public regexp_replace ( $pattern, $replacement, $subject, $limit ) : mixed | ||
$pattern | string Regular expression | |
$replacement | string String to replace matches in $subject with | |
$subject | string String to apply regular expression to | |
$limit | int Number of replacements to perform, maximum, or -1 for no limit. | |
return | mixed |
static public regexp_replace_callback ( $pattern, $callback, $subject, $limit ) : mixed | ||
$pattern | string Regular expression | |
$callback | callback PHP callback to generate content to replace matches with | |
$subject | string String to apply regular expression to | |
$limit | int Number of replacements to perform, maximum, or -1 for no limit. | |
return | mixed |
static public regexp_split ( $pattern, $subject, $limit ) : array | ||
$pattern | string Regular expression | |
$subject | string String to apply regular expression to | |
$limit | int Number of times to match; -1 for unlimited | |
return | array | Resulting string segments |
static public stripUnsafeHtml ( $input ) : string | ||
$input | string input string | |
return | string |
static public strtolower ( $string ) : string | ||
$string | string Input string | |
return | string | Lower case version of input string |
static public strtoupper ( $string ) : string | ||
$string | string Input string | |
return | string | Upper case version of input string |
static public substr_count ( $haystack, $needle ) : integer | ||
$haystack | string Input string to search | |
$needle | string String to search within $haystack for | |
return | integer | Count of number of times $needle appeared in $haystack |
static public substr_replace ( $string, $replacement, $start, $length = null ) : string | ||
$string | string Source string to perform replacement upon | |
$replacement | string Replacement to move into $string | |
$start | int Start location for replacement | |
$length | int Number of characters to replace in source string with $replacement | |
return | string | String resulting from replacement |
static public trimPunctuation ( $string ) : string | ||
$string | string input string | |
return | string | the trimmed string |
static public uncamelize ( $string ) : string | ||
$string | ||
return | string |
static public utf8_bad_find ( $str ) : string | ||
$str | string input string | |
return | string |
static public utf8_bad_replace ( $str, $replace = '?' ) : string | ||
$str | string input string | |
$replace | string optional | |
return | string |
static public utf8_bad_strip ( $str ) : string | ||
$str | string input string | |
return | string |
static public utf8_compliant ( $str ) : boolean | ||
$str | string input string | |
return | boolean |
static public utf8_is_valid ( $str ) : boolean | ||
$str | string input string | |
return | boolean |
static public utf8_normalize ( $str ) : string | ||
$str | string input string | |
return | string |
static public utf8_strip_ascii_ctrl ( $str ) : string | ||
$str | string input string | |
return | string |
static public utf8_to_ascii ( $str ) : string | ||
$str | string input string | |
return | string |