Multibyte Class Reference

Inheritance diagram for Multibyte:

Object

List of all members.


Static Public Member Functions

 ascii ($array)
getInstance ()
 stripos ($haystack, $needle, $offset=0)
 stristr ($haystack, $needle, $part=false)
 strlen ($string)
 strpos ($haystack, $needle, $offset=0)
 strrchr ($haystack, $needle, $part=false)
 strrichr ($haystack, $needle, $part=false)
 strripos ($haystack, $needle, $offset=0)
 strrpos ($haystack, $needle, $offset=0)
 strstr ($haystack, $needle, $part=false)
 strtolower ($string)
 strtoupper ($string)
 substr ($string, $start, $length=null)
 substrCount ($haystack, $needle)
 utf8 ($string)

Detailed Description

Definition at line 226 of file multibyte.php.


Member Function Documentation

Multibyte::ascii ( array  )  [static]

Converts the decimal value of a multibyte character string to a string

Parameters:
array $array
Returns:
string public

Definition at line 323 of file multibyte.php.

& Multibyte::getInstance (  )  [static]

Gets a reference to the Multibyte object instance

Returns:
object Multibyte instance public

Definition at line 262 of file multibyte.php.

Referenced by stripos(), stristr(), strlen(), strpos(), strrchr(), strrichr(), strripos(), strrpos(), strstr(), strtolower(), strtoupper(), substr(), substrCount(), and utf8().

Multibyte::stripos ( haystack,
needle,
offset = 0 
) [static]

Find position of first occurrence of a case-insensitive string.

Parameters:
multi-byte string $haystack The string from which to get the position of the first occurrence of $needle.
multi-byte string $needle The string to find in $haystack.
integer $offset The position in $haystack to start searching.
Returns:
integer|boolean The numeric position of the first occurrence of $needle in the $haystack string, or false if $needle is not found. public

Definition at line 351 of file multibyte.php.

References getInstance().

Multibyte::stristr ( haystack,
needle,
part = false 
) [static]

Finds first occurrence of a string within another, case insensitive.

Parameters:
string $haystack The string from which to get the first occurrence of $needle.
string $needle The string to find in $haystack.
boolean $part Determines which portion of $haystack this function returns. If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. If set to false, it returns all of $haystack from the first occurrence of $needle to the end, Default value is false.
Returns:
int|boolean The portion of $haystack, or false if $needle is not found. public

Definition at line 373 of file multibyte.php.

References getInstance().

Multibyte::strlen ( string  )  [static]

Get string length.

Parameters:
string $string The string being checked for length.
Returns:
integer The number of characters in string $string public

Definition at line 428 of file multibyte.php.

References getInstance().

Referenced by strtolower(), strtoupper(), and utf8().

Multibyte::strpos ( haystack,
needle,
offset = 0 
) [static]

Find position of first occurrence of a string.

Parameters:
string $haystack The string being checked.
string $needle The position counted from the beginning of haystack.
integer $offset The search offset. If it is not specified, 0 is used.
Returns:
integer|boolean The numeric position of the first occurrence of $needle in the $haystack string. If $needle is not found, it returns false. public

Definition at line 447 of file multibyte.php.

References getInstance().

Multibyte::strrchr ( haystack,
needle,
part = false 
) [static]

Finds the last occurrence of a character in a string within another.

Parameters:
string $haystack The string from which to get the last occurrence of $needle.
string $needle The string to find in $haystack.
boolean $part Determines which portion of $haystack this function returns. If set to true, it returns all of $haystack from the beginning to the last occurrence of $needle. If set to false, it returns all of $haystack from the last occurrence of $needle to the end, Default value is false.
Returns:
string|boolean The portion of $haystack. or false if $needle is not found. public

Definition at line 491 of file multibyte.php.

References getInstance().

Multibyte::strrichr ( haystack,
needle,
part = false 
) [static]

Finds the last occurrence of a character in a string within another, case insensitive.

Parameters:
string $haystack The string from which to get the last occurrence of $needle.
string $needle The string to find in $haystack.
boolean $part Determines which portion of $haystack this function returns. If set to true, it returns all of $haystack from the beginning to the last occurrence of $needle. If set to false, it returns all of $haystack from the last occurrence of $needle to the end, Default value is false.
Returns:
string|boolean The portion of $haystack. or false if $needle is not found. public

Definition at line 549 of file multibyte.php.

References getInstance().

Multibyte::strripos ( haystack,
needle,
offset = 0 
) [static]

Finds position of last occurrence of a string within another, case insensitive

Parameters:
string $haystack The string from which to get the position of the last occurrence of $needle.
string $needle The string to find in $haystack.
integer $offset The position in $haystack to start searching.
Returns:
integer|boolean The numeric position of the last occurrence of $needle in the $haystack string, or false if $needle is not found. public

Definition at line 607 of file multibyte.php.

References getInstance(), and ife().

Multibyte::strrpos ( haystack,
needle,
offset = 0 
) [static]

Find position of last occurrence of a string in a string.

Parameters:
string $haystack The string being checked, for the last occurrence of $needle.
string $needle The string to find in $haystack.
integer $offset May be specified to begin searching an arbitrary number of characters into the string. Negative values will stop searching at an arbitrary point prior to the end of the string.
Returns:
integer|boolean The numeric position of the last occurrence of $needle in the $haystack string. If $needle is not found, it returns false. public

Definition at line 659 of file multibyte.php.

References getInstance(), and ife().

Multibyte::strstr ( haystack,
needle,
part = false 
) [static]

Finds first occurrence of a string within another

Parameters:
string $haystack The string from which to get the first occurrence of $needle.
string $needle The string to find in $haystack
boolean $part Determines which portion of $haystack this function returns. If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. If set to false, it returns all of $haystack from the first occurrence of $needle to the end, Default value is FALSE.
Returns:
string|boolean The portion of $haystack, or true if $needle is not found. public

Definition at line 709 of file multibyte.php.

References getInstance().

Multibyte::strtolower ( string  )  [static]

Make a string lowercase

Parameters:
string $string The string being lowercased.
Returns:
string with all alphabetic characters converted to lowercase. public

Definition at line 762 of file multibyte.php.

References getInstance(), strlen(), and substr().

Multibyte::strtoupper ( string  )  [static]

Make a string uppercase

Parameters:
string $string The string being uppercased.
string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
Returns:
string with all alphabetic characters converted to uppercase. public

Definition at line 811 of file multibyte.php.

References getInstance(), strlen(), and substr().

Multibyte::substr ( string,
start,
length = null 
) [static]

Get part of string

Parameters:
string $string The string being checked.
integer $start The first position used in $string.
integer $length The maximum length of the returned string.
Returns:
string The portion of $string specified by the $string and $length parameters. public

Definition at line 942 of file multibyte.php.

References getInstance().

Referenced by strtolower(), and strtoupper().

Multibyte::substrCount ( haystack,
needle 
) [static]

Count the number of substring occurrences

Parameters:
string $haystack The string being checked.
string $needle The string being found.
Returns:
integer The number of times the $needle substring occurs in the $haystack string. public

Definition at line 903 of file multibyte.php.

References getInstance().

Multibyte::utf8 ( string  )  [static]

Converts a multibyte character string to the decimal value of the character

Parameters:
multibyte string $string
Returns:
array public

Definition at line 279 of file multibyte.php.

References getInstance(), ife(), and strlen().


The documentation for this class was generated from the following file: