Permalink
Browse files

removed duplicate methods from String class

  • Loading branch information...
1 parent 9976d14 commit 5b7e8f2c7851e54e6380180c9f4b4f51aed030a1 @juzna committed Mar 19, 2011
Showing with 0 additions and 16 deletions.
  1. +0 −16 app/classes/string.php
@@ -25,10 +25,6 @@ public static function uncamelize($str) {
return preg_replace('/(?<=[a-z])([A-Z])/e', "'-' . strtolower('\\1')", $str);
}
- public static function startsWith($haystack, $needle) {
- return strncmp($haystack, $needle, strlen($needle)) === 0;
- }
-
static function isFalse($val) {
return (!$val || $val == 'false' || $val == 'no');
}
@@ -51,18 +47,6 @@ static function getFirstLine($text) {
}
/**
- * Generate string of random characters
- * @param int $len
- * @return string
- */
- static function random__($len) {
- static $z = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
- $slen = strlen($z) - 1;
- for($s = ""; $len > 0; $len--) $s .= substr($z, rand(0, $slen), 1);
- return $s;
- }
-
- /**
* Implode using printf formatting
* @param string $glue Glue for implode
* @param string $format Formatting string - see printf

0 comments on commit 5b7e8f2

Please sign in to comment.