Permalink
Browse files

Fixed function static -> static function

  • Loading branch information...
1 parent 18210ae commit e7cac1eaa1626d8d95a1bb994fabbb267298cfb1 @shanielh shanielh committed Nov 26, 2011
Showing with 17 additions and 17 deletions.
  1. +17 −17 lib/leander/string.php
View
@@ -78,40 +78,40 @@ public static function multi_split($s, $delimiters = array(',', ';'), $limit = -
return $ret;
}
- function static starts($s, $pre = "") {
+ static function starts($s, $pre = "") {
if ($pre == '') return true;
return (preg_match('/^' . preg_quote($pre) . '/', $s) > 0);
}
- function static ends($s, $suf = "") {
+ static function ends($s, $suf = "") {
if ($suf == '') return true;
return (preg_match('/' . preg_quote($suf) . '$/', $s) > 0);
}
- function static before($c, $s, $first = true) {
+ static function before($c, $s, $first = true) {
if ($c == '') return $s;
$i = ($first) ? stripos($s, $c) : strripos($s, $c);
if ($i !== false) {
return substr($s, 0, $i);
}
return $s;
}
- function static after($c, $s, $first = true) {
+ static function after($c, $s, $first = true) {
if ($c == '') return $s;
$i = ($first) ? stripos($s, $c) : strripos($s, $c);
if ($i !== false) {
return substr($s, $i+strlen($c));
}
return "";
}
- function static my($s, $len = -1) {
+ static function my($s, $len = -1) {
if ($len != -1) {
$s = substr($s, 0, $len);
}
return mysql_real_escape_string($s);
}
- function static html($s) {
+ static function html($s) {
return htmlspecialchars($s);
}
- function static t($s, $c = " \t\n\r\0\x0B") {
+ static function t($s, $c = " \t\n\r\0\x0B") {
return trim($s, $c);
}
public static function username($s) {
@@ -128,35 +128,35 @@ public static function proper($s) {
}
return implode(' ', $pieces);
}
- function static lower($s) {
+ static function lower($s) {
return strtolower($s);
}
- function static upper($s) {
+ static function upper($s) {
return strtoupper($s);
}
- function static f($s, $regex = "/[^-a-zA-Z0-9_.@]+/S") {
+ static function f($s, $regex = "/[^-a-zA-Z0-9_.@]+/S") {
return preg_replace($regex, "", $s);
}
- function static e($s) {
+ static function e($s) {
return self::f($s, "/[^-a-zA-Z0-9_.@]+/S");
}
- function static a($s, $other_chars = "") {
+ static function a($s, $other_chars = "") {
$other_chars = addslashes($other_chars);
return self::f($s, "/[^".$other_chars."a-zA-Z0-9]+/S");
}
- function static n($s) {
+ static function n($s) {
return floatval($s);
}
- function static i($s) {
+ static function i($s) {
return intval($s);
}
- function static c($f) {
+ static function c($f) {
return sprintf("%01.2f", self::n(f));
}
- function static url($s) {
+ static function url($s) {
return urlencode($s);
}
- function static deurl($s) {
+ static function deurl($s) {
return urldecode($s);
}
}

0 comments on commit e7cac1e

Please sign in to comment.