Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.11 KB | None | 0 0
  1. <?php
  2. class Str
  3. {
  4.     private function __construct()
  5.     {
  6.  
  7.     }
  8.  
  9.     public static function compare($string1 = null, $string2 = null)
  10.     {
  11.         return \php\lib\str::compare($string1, $string2);
  12.     }
  13.  
  14.     public static function decode($string = null, $charset = null)
  15.     {
  16.         return \php\lib\str::decode($string, $charset);
  17.     }
  18.  
  19.     public static function encode($string = null, $charset = null)
  20.     {
  21.         return \php\lib\str::encode($string, $charset);
  22.     }
  23.  
  24.     public static function endsWith($string = null, $suffix = null)
  25.     {
  26.         return \php\lib\str::endsWith($string, $suffix);
  27.     }
  28.  
  29.     public static function join($collection = null, $separator = null, $limit = 0)
  30.     {
  31.         return \php\lib\str::join($collection, $separator, $limit);
  32.     }
  33.  
  34.     public static function length($string = null)
  35.     {
  36.         return \php\lib\str::length($string);
  37.     }
  38.  
  39.     public static function replace($string = null, $target = null, $replacement = null)
  40.     {
  41.         return \php\lib\str::replace($string, $target, $replacement);
  42.     }
  43.  
  44.     public static function split($string = null, $separator = null, $limit = 0)
  45.     {
  46.         return \php\lib\str::split($string, $separator, $limit);
  47.     }
  48.  
  49.     public static function startsWith($string = null, $prefix = null, $offset = 0)
  50.     {
  51.         return \php\lib\str::startsWith($string, $prefix, $offset);
  52.     }
  53.  
  54.     public static function trim($string = null, $charlist = " \t\n\r\0\x0B")
  55.     {
  56.         return \php\lib\str::trim($string, $charlist);
  57.     }
  58.  
  59.     public static function reverse($string = null)
  60.     {
  61.         return \php\lib\str::reverse($string);
  62.     }
  63.  
  64.     public static function shuffle($string = null)
  65.     {
  66.         return \php\lib\str::shuffle($string);
  67.     }
  68.  
  69.     public static function pos($string = null, $search = null, $fromIndex = 0)
  70.     {
  71.         return \php\lib\str::pos($string, $search, $fromIndex);
  72.     }
  73.  
  74.     public static function sub($string = null, $beginIndex = null, $endIndex = null)
  75.     {
  76.         return \php\lib\str::sub($string, $beginIndex, $endIndex);
  77.     }
  78.  
  79.     public static function isNumber($string = null)
  80.     {
  81.         return \php\lib\str::isNumber($string);
  82.     }
  83.  
  84.     public static function repeat($string = null, $amount = null)
  85.     {
  86.         return \php\lib\str::repeat($string, $amount);
  87.     }
  88.  
  89.     public static function lastPos($string = null, $search = null, $fromIndex = null)
  90.     {
  91.         return \php\lib\str::lastPos($string, $search, $fromIndex);
  92.     }
  93.  
  94.     public static function trimRight($string = null, $charlist = " \t\n\r\0\x0B")
  95.     {
  96.         return \php\lib\str::trimRight($string, $charlist);
  97.     }
  98.  
  99.     public static function trimLeft($string = null, $charlist = " \t\n\r\0\x0B")
  100.     {
  101.         return \php\lib\str::trimLeft($string, $charlist);
  102.     }
  103.  
  104.     public static function upper($string = null)
  105.     {
  106.         return \php\lib\str::upper($string);
  107.     }
  108.  
  109.     public static function lower($string = null)
  110.     {
  111.         return \php\lib\str::lower($string);
  112.     }
  113.  
  114.     public static function equalsIgnoreCase($string1 = null, $string2 = null)
  115.     {
  116.         return \php\lib\str::equalsIgnoreCase($string1, $string2);
  117.     }
  118.  
  119.     public static function posIgnoreCase($string = null, $search = null, $fromIndex = 0)
  120.     {
  121.         return \php\lib\str::posIgnoreCase($string, $search, $fromIndex);
  122.     }
  123.  
  124.     public static function lastPosIgnoreCase($string = null, $search = null, $fromIndex = null)
  125.     {
  126.         return \php\lib\str::lastPosIgnoreCase($string, $search, $fromIndex);
  127.     }
  128.  
  129.     public static function compareIgnoreCase($string1 = null, $string2 = null)
  130.     {
  131.         return \php\lib\str::compareIgnoreCase($string1, $string2);
  132.     }
  133.  
  134.     /**
  135.      * @param $string
  136.      * @param string $pattern
  137.      * @return bool
  138.      * @throws Exception
  139.      */
  140.     public static function like($string, $pattern = '\W+')
  141.     {
  142.         throw new Exception('Not implemented yet');
  143.     }
  144.  
  145.     /**
  146.      * $string = 'some any';
  147.      * return 'Some any';
  148.      *
  149.      * @param $string
  150.      * @return string
  151.      */
  152.     public static function upperFirst($string)
  153.     {
  154.         return self::upper(self::sub($string, 0, 1)) . self::sub($string, 1);
  155.     }
  156.  
  157.     /**
  158.      * Words split by " \t\n\r\0\x0B"
  159.      * $string = 'some any';
  160.      * return 'Some Any';
  161.      *
  162.      * @param $string
  163.      * @throws Exception
  164.      */
  165.     public static function upperWords($string)
  166.     {
  167.         throw new Exception('Not implemented yet');
  168.     }
  169.  
  170.     /**
  171.      * $string = 'Some Any';
  172.      * return 'some Any';
  173.      *
  174.      * @param $string
  175.      * @return string
  176.      */
  177.     public static function lowerFirst($string)
  178.     {
  179.         return self::lower(self::sub($string, 0, 1)) . self::sub($string, 1);
  180.     }
  181.  
  182.     /**
  183.      * Words split by " \t\n\r\0\x0B"
  184.      * $string = 'Some Anyasd_Fdgh Sfds';
  185.      * return 'some anyasd_Fdgh sfds';
  186.      *
  187.      * @param $string
  188.      * @throws Exception
  189.      */
  190.     public static function lowerWords($string)
  191.     {
  192.         throw new Exception('Not implemented yet');
  193.     }
  194.  
  195.     /**
  196.      * $string = 'some_any asd'
  197.      * return 'SomeAnyAsd';
  198.      *
  199.      * @param $string
  200.      * @throws Exception
  201.      */
  202.     public static function camel($string)
  203.     {
  204.         throw new Exception('Not implemented yet');
  205.     }
  206.  
  207.     /**
  208.      * $string = 'SomeAny Asd asd'
  209.      * return 'some_any_asd_asd';
  210.      *
  211.      * @param $string
  212.      * @throws Exception
  213.      */
  214.     public static function snake($string)
  215.     {
  216.         throw new Exception('Not implemented yet');
  217.     }
  218.  
  219.     /**
  220.      * $string = 'some_any asd'
  221.      * return 'someAnyAsd';
  222.      *
  223.      * @param $string
  224.      * @throws Exception
  225.      */
  226.     public static function studly($string)
  227.     {
  228.         throw new Exception('Not implemented yet');
  229.     }
  230.  
  231.     /**
  232.      * $string = 'some any asdasd'
  233.      * return 'Some Any Asdasd'
  234.      *
  235.      * @param $string
  236.      * @return string
  237.      * @throws Exception
  238.      */
  239.     public static function capitalize($string)
  240.     {
  241.         throw new Exception('Not implemented yet');
  242.     }
  243. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement