|
|
@ -36,7 +36,8 @@ if (function_exists('mb_internal_encoding')) {
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param integer $offset The position in $haystack to start searching.
|
|
|
|
* @param integer $offset The position in $haystack to start searching.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string, or false if $needle is not found.
|
|
|
|
* @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string, or false
|
|
|
|
|
|
|
|
* if $needle is not found.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if (!function_exists('mb_stripos')) {
|
|
|
|
if (!function_exists('mb_stripos')) {
|
|
|
|
function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) {
|
|
|
|
function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) {
|
|
|
@ -49,8 +50,9 @@ if (!function_exists('mb_stripos')) {
|
|
|
|
* @param string $haystack The string from which to get the first occurrence of $needle.
|
|
|
|
* @param string $haystack The string from which to get the first occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param boolean $part Determines which portion of $haystack this function returns.
|
|
|
|
* @param 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 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.
|
|
|
|
* If set to false, it returns all of $haystack from the first occurrence of $needle to the end,
|
|
|
|
|
|
|
|
* Default value is false.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @return string|boolean The portion of $haystack, or false if $needle is not found.
|
|
|
|
* @return string|boolean The portion of $haystack, or false if $needle is not found.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -65,7 +67,7 @@ if (!function_exists('mb_stristr')) {
|
|
|
|
* @param string $string The string being checked for length.
|
|
|
|
* @param string $string The string being checked for length.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @return integer The number of characters in string $string having character encoding encoding.
|
|
|
|
* @return integer The number of characters in string $string having character encoding encoding.
|
|
|
|
* A multi-byte character is counted as 1.
|
|
|
|
* A multi-byte character is counted as 1.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if (!function_exists('mb_strlen')) {
|
|
|
|
if (!function_exists('mb_strlen')) {
|
|
|
|
function mb_strlen($string, $encoding = null) {
|
|
|
|
function mb_strlen($string, $encoding = null) {
|
|
|
@ -80,7 +82,7 @@ if (!function_exists('mb_strlen')) {
|
|
|
|
* @param integer $offset The search offset. If it is not specified, 0 is used.
|
|
|
|
* @param integer $offset The search offset. If it is not specified, 0 is used.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string.
|
|
|
|
* @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string.
|
|
|
|
* If $needle is not found, it returns false.
|
|
|
|
* If $needle is not found, it returns false.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if (!function_exists('mb_strpos')) {
|
|
|
|
if (!function_exists('mb_strpos')) {
|
|
|
|
function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) {
|
|
|
|
function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) {
|
|
|
@ -93,8 +95,9 @@ if (!function_exists('mb_strpos')) {
|
|
|
|
* @param string $haystack The string from which to get the last occurrence of $needle.
|
|
|
|
* @param string $haystack The string from which to get the last occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param boolean $part Determines which portion of $haystack this function returns.
|
|
|
|
* @param 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 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.
|
|
|
|
* If set to false, it returns all of $haystack from the last occurrence of $needle to the end,
|
|
|
|
|
|
|
|
* Default value is false.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @return string|boolean The portion of $haystack. or false if $needle is not found.
|
|
|
|
* @return string|boolean The portion of $haystack. or false if $needle is not found.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -109,8 +112,9 @@ if (!function_exists('mb_strrchr')) {
|
|
|
|
* @param string $haystack The string from which to get the last occurrence of $needle.
|
|
|
|
* @param string $haystack The string from which to get the last occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param boolean $part Determines which portion of $haystack this function returns.
|
|
|
|
* @param 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 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.
|
|
|
|
* If set to false, it returns all of $haystack from the last occurrence of $needle to the end,
|
|
|
|
|
|
|
|
* Default value is false.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @return string|boolean The portion of $haystack. or false if $needle is not found.
|
|
|
|
* @return string|boolean The portion of $haystack. or false if $needle is not found.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -126,7 +130,8 @@ if (!function_exists('mb_strrichr')) {
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param integer $offset The position in $haystack to start searching.
|
|
|
|
* @param integer $offset The position in $haystack to start searching.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string, or false if $needle is not found.
|
|
|
|
* @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string,
|
|
|
|
|
|
|
|
* or false if $needle is not found.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if (!function_exists('mb_strripos')) {
|
|
|
|
if (!function_exists('mb_strripos')) {
|
|
|
|
function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) {
|
|
|
|
function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) {
|
|
|
@ -139,9 +144,10 @@ if (!function_exists('mb_strripos')) {
|
|
|
|
* @param string $haystack The string being checked, for the last occurrence of $needle.
|
|
|
|
* @param string $haystack The string being checked, for the last occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param integer $offset May be specified to begin searching an arbitrary number of characters into the string.
|
|
|
|
* @param 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.
|
|
|
|
* Negative values will stop searching at an arbitrary point prior to the end of the string.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string. If $needle is not found, it returns false.
|
|
|
|
* @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string.
|
|
|
|
|
|
|
|
* If $needle is not found, it returns false.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if (!function_exists('mb_strrpos')) {
|
|
|
|
if (!function_exists('mb_strrpos')) {
|
|
|
|
function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) {
|
|
|
|
function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) {
|
|
|
@ -154,8 +160,9 @@ if (!function_exists('mb_strrpos')) {
|
|
|
|
* @param string $haystack The string from which to get the first occurrence of $needle.
|
|
|
|
* @param string $haystack The string from which to get the first occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack
|
|
|
|
* @param string $needle The string to find in $haystack
|
|
|
|
* @param boolean $part Determines which portion of $haystack this function returns.
|
|
|
|
* @param 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 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.
|
|
|
|
* If set to false, it returns all of $haystack from the first occurrence of $needle to the end,
|
|
|
|
|
|
|
|
* Default value is FALSE.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
|
|
|
|
* @return string|boolean The portion of $haystack, or true if $needle is not found.
|
|
|
|
* @return string|boolean The portion of $haystack, or true if $needle is not found.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -220,12 +227,13 @@ if (!function_exists('mb_substr')) {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string $str The string being encoded
|
|
|
|
* @param string $str The string being encoded
|
|
|
|
* @param string $charset specifies the name of the character set in which str is represented in.
|
|
|
|
* @param string $charset specifies the name of the character set in which str is represented in.
|
|
|
|
* The default value is determined by the current NLS setting (mbstring.language).
|
|
|
|
* The default value is determined by the current NLS setting (mbstring.language).
|
|
|
|
* @param string $transfer_encoding specifies the scheme of MIME encoding. It should be either "B" (Base64) or "Q" (Quoted-Printable).
|
|
|
|
* @param string $transfer_encoding specifies the scheme of MIME encoding.
|
|
|
|
* Falls back to "B" if not given.
|
|
|
|
* It should be either "B" (Base64) or "Q" (Quoted-Printable). Falls back to "B" if not given.
|
|
|
|
* @param string $linefeed specifies the EOL (end-of-line) marker with which mb_encode_mimeheader() performs line-folding
|
|
|
|
* @param string $linefeed specifies the EOL (end-of-line) marker with which
|
|
|
|
* (a » RFC term, the act of breaking a line longer than a certain length into multiple lines.
|
|
|
|
* mb_encode_mimeheader() performs line-folding
|
|
|
|
* The length is currently hard-coded to 74 characters). Falls back to "\r\n" (CRLF) if not given.
|
|
|
|
* (a » RFC term, the act of breaking a line longer than a certain length into multiple lines.
|
|
|
|
|
|
|
|
* The length is currently hard-coded to 74 characters). Falls back to "\r\n" (CRLF) if not given.
|
|
|
|
* @param integer $indent [definition unknown and appears to have no affect]
|
|
|
|
* @param integer $indent [definition unknown and appears to have no affect]
|
|
|
|
* @return string A converted version of the string represented in ASCII.
|
|
|
|
* @return string A converted version of the string represented in ASCII.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -300,7 +308,7 @@ class Multibyte extends Object {
|
|
|
|
if ($value < 128) {
|
|
|
|
if ($value < 128) {
|
|
|
|
$map[] = $value;
|
|
|
|
$map[] = $value;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (count($values) == 0) {
|
|
|
|
if (empty($values)) {
|
|
|
|
$find = ($value < 224) ? 2 : 3;
|
|
|
|
$find = ($value < 224) ? 2 : 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$values[] = $value;
|
|
|
|
$values[] = $value;
|
|
|
@ -350,7 +358,8 @@ class Multibyte extends Object {
|
|
|
|
* @param multi-byte string $haystack The string from which to get the position of the first occurrence of $needle.
|
|
|
|
* @param multi-byte string $haystack The string from which to get the position of the first occurrence of $needle.
|
|
|
|
* @param multi-byte string $needle The string to find in $haystack.
|
|
|
|
* @param multi-byte string $needle The string to find in $haystack.
|
|
|
|
* @param integer $offset The position in $haystack to start searching.
|
|
|
|
* @param integer $offset The position in $haystack to start searching.
|
|
|
|
* @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string, or false if $needle is not found.
|
|
|
|
* @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string,
|
|
|
|
|
|
|
|
* or false if $needle is not found.
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
* @static
|
|
|
|
* @static
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -368,8 +377,9 @@ class Multibyte extends Object {
|
|
|
|
* @param string $haystack The string from which to get the first occurrence of $needle.
|
|
|
|
* @param string $haystack The string from which to get the first occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param boolean $part Determines which portion of $haystack this function returns.
|
|
|
|
* @param 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 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.
|
|
|
|
* If set to false, it returns all of $haystack from the first occurrence of $needle to the end,
|
|
|
|
|
|
|
|
* Default value is false.
|
|
|
|
* @return int|boolean The portion of $haystack, or false if $needle is not found.
|
|
|
|
* @return int|boolean The portion of $haystack, or false if $needle is not found.
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
* @static
|
|
|
|
* @static
|
|
|
@ -445,7 +455,7 @@ class Multibyte extends Object {
|
|
|
|
* @param string $needle The position counted from the beginning of haystack.
|
|
|
|
* @param string $needle The position counted from the beginning of haystack.
|
|
|
|
* @param integer $offset The search offset. If it is not specified, 0 is used.
|
|
|
|
* @param integer $offset The search offset. If it is not specified, 0 is used.
|
|
|
|
* @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string.
|
|
|
|
* @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string.
|
|
|
|
* If $needle is not found, it returns false.
|
|
|
|
* If $needle is not found, it returns false.
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
* @static
|
|
|
|
* @static
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -488,8 +498,9 @@ class Multibyte extends Object {
|
|
|
|
* @param string $haystack The string from which to get the last occurrence of $needle.
|
|
|
|
* @param string $haystack The string from which to get the last occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param boolean $part Determines which portion of $haystack this function returns.
|
|
|
|
* @param 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 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.
|
|
|
|
* If set to false, it returns all of $haystack from the last occurrence of $needle to the end,
|
|
|
|
|
|
|
|
* Default value is false.
|
|
|
|
* @return string|boolean The portion of $haystack. or false if $needle is not found.
|
|
|
|
* @return string|boolean The portion of $haystack. or false if $needle is not found.
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
* @static
|
|
|
|
* @static
|
|
|
@ -548,8 +559,9 @@ class Multibyte extends Object {
|
|
|
|
* @param string $haystack The string from which to get the last occurrence of $needle.
|
|
|
|
* @param string $haystack The string from which to get the last occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param boolean $part Determines which portion of $haystack this function returns.
|
|
|
|
* @param 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 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.
|
|
|
|
* If set to false, it returns all of $haystack from the last occurrence of $needle to the end,
|
|
|
|
|
|
|
|
* Default value is false.
|
|
|
|
* @return string|boolean The portion of $haystack. or false if $needle is not found.
|
|
|
|
* @return string|boolean The portion of $haystack. or false if $needle is not found.
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
* @static
|
|
|
|
* @static
|
|
|
@ -610,7 +622,8 @@ class Multibyte extends Object {
|
|
|
|
* @param string $haystack The string from which to get the position of the last occurrence of $needle.
|
|
|
|
* @param string $haystack The string from which to get the position of the last occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param integer $offset The position in $haystack to start searching.
|
|
|
|
* @param integer $offset The position in $haystack to start searching.
|
|
|
|
* @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string, or false if $needle is not found.
|
|
|
|
* @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string,
|
|
|
|
|
|
|
|
* or false if $needle is not found.
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
* @static
|
|
|
|
* @static
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -661,8 +674,9 @@ class Multibyte extends Object {
|
|
|
|
* @param string $haystack The string being checked, for the last occurrence of $needle.
|
|
|
|
* @param string $haystack The string being checked, for the last occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param string $needle The string to find in $haystack.
|
|
|
|
* @param integer $offset May be specified to begin searching an arbitrary number of characters into the string.
|
|
|
|
* @param 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.
|
|
|
|
* Negative values will stop searching at an arbitrary point prior to the end of the string.
|
|
|
|
* @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string. If $needle is not found, it returns false.
|
|
|
|
* @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string.
|
|
|
|
|
|
|
|
* If $needle is not found, it returns false.
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
* @static
|
|
|
|
* @static
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -711,8 +725,9 @@ class Multibyte extends Object {
|
|
|
|
* @param string $haystack The string from which to get the first occurrence of $needle.
|
|
|
|
* @param string $haystack The string from which to get the first occurrence of $needle.
|
|
|
|
* @param string $needle The string to find in $haystack
|
|
|
|
* @param string $needle The string to find in $haystack
|
|
|
|
* @param boolean $part Determines which portion of $haystack this function returns.
|
|
|
|
* @param 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 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.
|
|
|
|
* If set to false, it returns all of $haystack from the first occurrence of $needle to the end,
|
|
|
|
|
|
|
|
* Default value is FALSE.
|
|
|
|
* @return string|boolean The portion of $haystack, or true if $needle is not found.
|
|
|
|
* @return string|boolean The portion of $haystack, or true if $needle is not found.
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
* @static
|
|
|
|
* @static
|
|
|
@ -853,14 +868,14 @@ class Multibyte extends Object {
|
|
|
|
if ($length > 1 && count($keys[$key]['lower']) > 1) {
|
|
|
|
if ($length > 1 && count($keys[$key]['lower']) > 1) {
|
|
|
|
$j = 0;
|
|
|
|
$j = 0;
|
|
|
|
|
|
|
|
|
|
|
|
for ($ii = 0; $ii < count($keys[$key]['lower']); $ii++) {
|
|
|
|
for ($ii = 0, $count = count($keys[$key]['lower']); $ii < $count; $ii++) {
|
|
|
|
$nextChar = $utf8Map[$i + $ii];
|
|
|
|
$nextChar = $utf8Map[$i + $ii];
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($nextChar) && ($nextChar == $keys[$key]['lower'][$j + $ii])) {
|
|
|
|
if (isset($nextChar) && ($nextChar == $keys[$key]['lower'][$j + $ii])) {
|
|
|
|
$replace++;
|
|
|
|
$replace++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($replace == count($keys[$key]['lower'])) {
|
|
|
|
if ($replace == $count) {
|
|
|
|
$upperCase[] = $keys[$key]['upper'];
|
|
|
|
$upperCase[] = $keys[$key]['upper'];
|
|
|
|
$replaced = array_merge($replaced, array_values($keys[$key]['lower']));
|
|
|
|
$replaced = array_merge($replaced, array_values($keys[$key]['lower']));
|
|
|
|
$matched = true;
|
|
|
|
$matched = true;
|
|
|
@ -873,14 +888,14 @@ class Multibyte extends Object {
|
|
|
|
|
|
|
|
|
|
|
|
if (in_array($nextChar, $keys[$ii]['lower'])) {
|
|
|
|
if (in_array($nextChar, $keys[$ii]['lower'])) {
|
|
|
|
|
|
|
|
|
|
|
|
for ($jj = 0; $jj < count($keys[$ii]['lower']); $jj++) {
|
|
|
|
for ($jj = 0, $count = count($keys[$ii]['lower']); $jj < $count; $jj++) {
|
|
|
|
$nextChar = $utf8Map[$i + $jj];
|
|
|
|
$nextChar = $utf8Map[$i + $jj];
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($nextChar) && ($nextChar == $keys[$ii]['lower'][$j + $jj])) {
|
|
|
|
if (isset($nextChar) && ($nextChar == $keys[$ii]['lower'][$j + $jj])) {
|
|
|
|
$replace++;
|
|
|
|
$replace++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($replace == count($keys[$ii]['lower'])) {
|
|
|
|
if ($replace == $count) {
|
|
|
|
$upperCase[] = $keys[$ii]['upper'];
|
|
|
|
$upperCase[] = $keys[$ii]['upper'];
|
|
|
|
$replaced = array_merge($replaced, array_values($keys[$ii]['lower']));
|
|
|
|
$replaced = array_merge($replaced, array_values($keys[$ii]['lower']));
|
|
|
|
$matched = true;
|
|
|
|
$matched = true;
|
|
|
|