Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Str
- {
- private function __construct()
- {
- }
- public static function compare($string1 = null, $string2 = null)
- {
- return \php\lib\str::compare($string1, $string2);
- }
- public static function decode($string = null, $charset = null)
- {
- return \php\lib\str::decode($string, $charset);
- }
- public static function encode($string = null, $charset = null)
- {
- return \php\lib\str::encode($string, $charset);
- }
- public static function endsWith($string = null, $suffix = null)
- {
- return \php\lib\str::endsWith($string, $suffix);
- }
- public static function join($collection = null, $separator = null, $limit = 0)
- {
- return \php\lib\str::join($collection, $separator, $limit);
- }
- public static function length($string = null)
- {
- return \php\lib\str::length($string);
- }
- public static function replace($string = null, $target = null, $replacement = null)
- {
- return \php\lib\str::replace($string, $target, $replacement);
- }
- public static function split($string = null, $separator = null, $limit = 0)
- {
- return \php\lib\str::split($string, $separator, $limit);
- }
- public static function startsWith($string = null, $prefix = null, $offset = 0)
- {
- return \php\lib\str::startsWith($string, $prefix, $offset);
- }
- public static function trim($string = null, $charlist = " \t\n\r\0\x0B")
- {
- return \php\lib\str::trim($string, $charlist);
- }
- public static function reverse($string = null)
- {
- return \php\lib\str::reverse($string);
- }
- public static function shuffle($string = null)
- {
- return \php\lib\str::shuffle($string);
- }
- public static function pos($string = null, $search = null, $fromIndex = 0)
- {
- return \php\lib\str::pos($string, $search, $fromIndex);
- }
- public static function sub($string = null, $beginIndex = null, $endIndex = null)
- {
- return \php\lib\str::sub($string, $beginIndex, $endIndex);
- }
- public static function isNumber($string = null)
- {
- return \php\lib\str::isNumber($string);
- }
- public static function repeat($string = null, $amount = null)
- {
- return \php\lib\str::repeat($string, $amount);
- }
- public static function lastPos($string = null, $search = null, $fromIndex = null)
- {
- return \php\lib\str::lastPos($string, $search, $fromIndex);
- }
- public static function trimRight($string = null, $charlist = " \t\n\r\0\x0B")
- {
- return \php\lib\str::trimRight($string, $charlist);
- }
- public static function trimLeft($string = null, $charlist = " \t\n\r\0\x0B")
- {
- return \php\lib\str::trimLeft($string, $charlist);
- }
- public static function upper($string = null)
- {
- return \php\lib\str::upper($string);
- }
- public static function lower($string = null)
- {
- return \php\lib\str::lower($string);
- }
- public static function equalsIgnoreCase($string1 = null, $string2 = null)
- {
- return \php\lib\str::equalsIgnoreCase($string1, $string2);
- }
- public static function posIgnoreCase($string = null, $search = null, $fromIndex = 0)
- {
- return \php\lib\str::posIgnoreCase($string, $search, $fromIndex);
- }
- public static function lastPosIgnoreCase($string = null, $search = null, $fromIndex = null)
- {
- return \php\lib\str::lastPosIgnoreCase($string, $search, $fromIndex);
- }
- public static function compareIgnoreCase($string1 = null, $string2 = null)
- {
- return \php\lib\str::compareIgnoreCase($string1, $string2);
- }
- /**
- * @param $string
- * @param string $pattern
- * @return bool
- * @throws Exception
- */
- public static function like($string, $pattern = '\W+')
- {
- throw new Exception('Not implemented yet');
- }
- /**
- * $string = 'some any';
- * return 'Some any';
- *
- * @param $string
- * @return string
- */
- public static function upperFirst($string)
- {
- return self::upper(self::sub($string, 0, 1)) . self::sub($string, 1);
- }
- /**
- * Words split by " \t\n\r\0\x0B"
- * $string = 'some any';
- * return 'Some Any';
- *
- * @param $string
- * @throws Exception
- */
- public static function upperWords($string)
- {
- throw new Exception('Not implemented yet');
- }
- /**
- * $string = 'Some Any';
- * return 'some Any';
- *
- * @param $string
- * @return string
- */
- public static function lowerFirst($string)
- {
- return self::lower(self::sub($string, 0, 1)) . self::sub($string, 1);
- }
- /**
- * Words split by " \t\n\r\0\x0B"
- * $string = 'Some Anyasd_Fdgh Sfds';
- * return 'some anyasd_Fdgh sfds';
- *
- * @param $string
- * @throws Exception
- */
- public static function lowerWords($string)
- {
- throw new Exception('Not implemented yet');
- }
- /**
- * $string = 'some_any asd'
- * return 'SomeAnyAsd';
- *
- * @param $string
- * @throws Exception
- */
- public static function camel($string)
- {
- throw new Exception('Not implemented yet');
- }
- /**
- * $string = 'SomeAny Asd asd'
- * return 'some_any_asd_asd';
- *
- * @param $string
- * @throws Exception
- */
- public static function snake($string)
- {
- throw new Exception('Not implemented yet');
- }
- /**
- * $string = 'some_any asd'
- * return 'someAnyAsd';
- *
- * @param $string
- * @throws Exception
- */
- public static function studly($string)
- {
- throw new Exception('Not implemented yet');
- }
- /**
- * $string = 'some any asdasd'
- * return 'Some Any Asdasd'
- *
- * @param $string
- * @return string
- * @throws Exception
- */
- public static function capitalize($string)
- {
- throw new Exception('Not implemented yet');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement