Kohana v3.3.2

This commit is contained in:
Deon George
2014-09-06 23:43:07 +10:00
parent f96694b18f
commit 8888719653
236 changed files with 1685 additions and 996 deletions

View File

@@ -19,4 +19,4 @@ function _ltrim($str, $charlist = NULL)
$charlist = preg_replace('#[-\[\]:\\\\^/]#', '\\\\$0', $charlist);
return preg_replace('/^['.$charlist.']+/u', '', $str);
}
}

View File

@@ -69,4 +69,4 @@ function _ord($chr)
':ordinal' => $ord0,
));
}
}
}

View File

@@ -19,4 +19,4 @@ function _rtrim($str, $charlist = NULL)
$charlist = preg_replace('#[-\[\]:\\\\^/]#', '\\\\$0', $charlist);
return preg_replace('/['.$charlist.']++$/uD', '', $str);
}
}

View File

@@ -49,4 +49,4 @@ function _str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_R
throw new UTF8_Exception("UTF8::str_pad: Unknown padding type (:pad_type)", array(
':pad_type' => $pad_type,
));
}
}

View File

@@ -24,4 +24,4 @@ function _str_split($str, $split_length = 1)
preg_match_all('/.{'.$split_length.'}|[^\x00]{1,'.$split_length.'}$/us', $str, $matches);
return $matches[0];
}
}

View File

@@ -16,4 +16,4 @@ function _strcasecmp($str1, $str2)
$str1 = UTF8::strtolower($str1);
$str2 = UTF8::strtolower($str2);
return strcmp($str1, $str2);
}
}

View File

@@ -27,4 +27,4 @@ function _strcspn($str, $mask, $offset = NULL, $length = NULL)
preg_match('/^[^'.$mask.']+/u', $str, $matches);
return isset($matches[0]) ? UTF8::strlen($matches[0]) : 0;
}
}

View File

@@ -25,4 +25,4 @@ function _stristr($str, $search)
return substr($str, strlen($matches[1]));
return FALSE;
}
}

View File

@@ -14,4 +14,4 @@ function _strlen($str)
return strlen($str);
return strlen(utf8_decode($str));
}
}

View File

@@ -24,4 +24,4 @@ function _strpos($str, $search, $offset = 0)
$str = UTF8::substr($str, $offset);
$pos = UTF8::strpos($str, $search);
return ($pos === FALSE) ? FALSE : ($pos + $offset);
}
}

View File

@@ -15,4 +15,4 @@ function _strrev($str)
preg_match_all('/./us', $str, $matches);
return implode('', array_reverse($matches[0]));
}
}

View File

@@ -24,4 +24,4 @@ function _strrpos($str, $search, $offset = 0)
$str = UTF8::substr($str, $offset);
$pos = UTF8::strrpos($str, $search);
return ($pos === FALSE) ? FALSE : ($pos + $offset);
}
}

View File

@@ -27,4 +27,4 @@ function _strspn($str, $mask, $offset = NULL, $length = NULL)
preg_match('/^[^'.$mask.']+/u', $str, $matches);
return isset($matches[0]) ? UTF8::strlen($matches[0]) : 0;
}
}

View File

@@ -78,4 +78,4 @@ function _strtolower($str)
}
return UTF8::from_unicode($uni);
}
}

View File

@@ -78,4 +78,4 @@ function _strtoupper($str)
}
return UTF8::from_unicode($uni);
}
}

View File

@@ -69,4 +69,4 @@ function _substr($str, $offset, $length = NULL)
preg_match('/'.$regex.'/us', $str, $matches);
return $matches[1];
}
}

View File

@@ -19,4 +19,4 @@ function _substr_replace($str, $replacement, $offset, $length = NULL)
array_splice($str_array[0], $offset, $length, $replacement_array[0]);
return implode('', $str_array[0]);
}
}

View File

@@ -142,4 +142,4 @@ function _to_unicode($str)
}
return $out;
}
}

View File

@@ -74,4 +74,4 @@ function _transliterate_to_ascii($str, $case = 0)
}
return $str;
}
}

View File

@@ -14,4 +14,4 @@ function _trim($str, $charlist = NULL)
return trim($str);
return UTF8::ltrim(UTF8::rtrim($str, $charlist), $charlist);
}
}

View File

@@ -15,4 +15,4 @@ function _ucfirst($str)
preg_match('/^(.?)(.*)$/us', $str, $matches);
return UTF8::strtoupper($matches[1]).$matches[2];
}
}

View File

@@ -20,4 +20,4 @@ function _ucwords($str)
'UTF8::strtoupper(\'$0\')',
$str
);
}
}