Methods summary
protected static
boolean
|
#
_functionExists( string $functionName )
Checks if a given mbstring function exists.
Checks if a given mbstring function exists.
Caches informations about existing mbstring functions for better
performance.
Parameters
- $functionName
string $functionName
Returns
boolean
|
protected static
string
|
#
_getEncoding( string|null $encoding = null )
Determines multi byte encoding to be used for various mbstring functions.
Determines multi byte encoding to be used for various mbstring functions.
If NULL is given the encoding for the current language is used which tends to
be awfully slow as it requires a database lookup!
If none could be determined the current set encoding is used.
Parameters
- $encoding
string|null $encoding - give a string to use a specific encoding - give null to use the
encoding of the current language
Returns
string
|
public static
string
|
#
toLowerCase( string $string, string|null $encoding = null )
Make a string lowercase
Parameters
- $string
string $string The string being lowercased
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
string with all alphabetic characters converted to lowercases
Link
|
public static
string
|
#
toUpperCase( string $string, string|null $encoding = null )
Make a string uppercase
Parameters
- $string
string $string The string being uppercased
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
string with all alphabetic characters converted to uppercases
Link
|
public static
integer
|
#
getStringLength( string $string, string|null $encoding = null )
Get string length
Parameters
- $string
string $string The string being checked for length
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
integer Returns the number of characters
Link
|
public static
string
|
#
getPartOfString( string $string, integer $start, integer $length = null, string|null $encoding = null )
Get string length
Parameters
- $string
string $string The string to extract the substring form
- $start
integer $start
- $length
integer $length [Optional] Maximum number of characters to use from $string, standard is
NULL
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
string Returns the number of characters
Link
|
public static
integer
|
#
countSubstring( string $haystack, string $needle, string|null $encoding = null )
Count the number of substring occurences
Count the number of substring occurences
Parameters
- $haystack
string $haystack The string being checked
- $needle
string $needle The string being found
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
integer The number of times the needle substring occurs in the haystack string.
Link
|
public static
boolean
|
#
mail( string $to, string $subject, string $message, string $additional_headers = null, string $additional_parameter = null )
Send encoded mail
Parameters
- $to
string $to The mail addresses being sent to (multiple recipents comma separated)
- $subject
string $subject The subject of the mail
- $message
string $message The message of the mail
- $additional_headers
string $additional_headers [Optional]
- $additional_parameter
string $additional_parameter [Optional]
Returns
boolean true or false
Link
|
public static
integer
|
#
findFirstPos( string $haystack, string $needle, integer $offset = 0, string|null $encoding = null )
Find the position of first occurence of string in a string
Find the position of first occurence of string in a string
Parameters
- $haystack
string $haystack
- $needle
string $needle
- $offset
integer $offset [Optional]
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
integer Returns the numeric position of the first occurrence of needle in the haystack
string
Link
|
public static
integer
|
#
findLastPos( string $haystack, string $needle, integer $offset = 0, string|null $encoding = null )
Find the position of last occurence of string in a string
Find the position of last occurence of string in a string
Parameters
- $haystack
string $haystack
- $needle
string $needle
- $offset
integer $offset [Optional]
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
integer Returns the numeric position of the last occurrence of needle in the haystack
string
Link
|
public static
integer
|
#
findFirstPosCI( string $haystack, string $needle, integer $offset = 0, string|null $encoding = null )
Finds position of first occurrence of a string within another, case
insensitive
Finds position of first occurrence of a string within another, case
insensitive
Parameters
- $haystack
string $haystack
- $needle
string $needle
- $offset
integer $offset [Optional]
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
integer Returns the numeric position of the first occurrence of needle in the haystack
string
Link
|
public static
integer
|
#
findLastPosCI( string $haystack, string $needle, integer $offset = 0, string|null $encoding = null )
Finds position of last occurrence of a string within another, case
insensitive
Finds position of last occurrence of a string within another, case
insensitive
Parameters
- $haystack
string $haystack
- $needle
string $needle
- $offset
integer $offset [Optional]
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
integer Returns the numeric position of the last occurrence of needle in the haystack
string
Link
|
public static
string
|
#
findFirstOccurrenceCI( string $haystack, string $needle, boolean $before_needle = false, string|null $encoding = null )
Finds first occurrence of a string within another, case insensitive
Finds first occurrence of a string within another, case insensitive
Parameters
- $haystack
string $haystack
- $needle
string $needle
- $before_needle
boolean $before_needle [Optional]
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
string Returns the portion of haystack, or FALSE if needle is not found.
Link
|
public static
string
|
#
findLastOccurrence( string $haystack, string $needle, boolean $part = false, string|null $encoding = null )
Finds first occurrence of a string within another, case insensitive
Finds first occurrence of a string within another, case insensitive
Parameters
- $haystack
string $haystack
- $needle
string $needle
- $part
boolean $part [Optional]
- $encoding
string|null $encoding encoding parameter, standard: cRegistry::getEncoding()
Returns
string Returns the portion of haystack, or FALSE if needle is not found.
Link
|
public static
integer
|
#
ereg( string $pattern, string $string, array & $regs = array() )
Regular expression match
Parameters
- $pattern
string $pattern
- $string
string $string
- $regs
array $regs [Optional]
Returns
integer
Link
|
public static
integer
|
#
eregi( string $pattern, string $string, array & $regs = array() )
Regular expression match ignoring case
Regular expression match ignoring case
Parameters
- $pattern
string $pattern
- $string
string $string
- $regs
array $regs [Optional]
Returns
integer Returns the byte length of the matched string if a match for pattern was found
in string
Link
|
public static
false|string
|
#
ereg_replace( string $pattern, string $replacement, string $string, string $option = 'msr' )
Replace regular expression
Replace regular expression
Parameters
- $pattern
string $pattern
- $replacement
string $replacement
- $string
string $string
- $option
string $option [Optional]
Returns
false|string Returns the byte length of the matched string if a match for pattern was found
in string
Link
|
public static
false|string
|
#
eregi_replace( string $pattern, string $replacement, string $string, string $option = 'msr' )
Replace regular expression ignoring case
Replace regular expression ignoring case
Parameters
- $pattern
string $pattern
- $replacement
string $replacement
- $string
string $string
- $option
string $option [Optional]
Returns
false|string Returns the byte length of the matched string if a match for pattern was found
in string
Link
|
public static
string[]
|
#
split( string $pattern, string $string, integer $limit = -1 )
Split string using regular expression
Split string using regular expression
Parameters
- $pattern
string $pattern
- $string
string $string
- $limit
integer $limit [Optional]
Returns
string[] The result as an array
Link
|