Beispiel #1
0
 /**
  * Strips whitespace (or other UTF-8 characters) from the end of a string.
  * @see http://php.net/rtrim
  *
  * @author  Andreas Gohr <*****@*****.**>
  *
  * @param   string   input string
  * @param   string   string of characters to remove
  * @return  string
  */
 public static function rtrim($str, $charlist = NULL)
 {
     if (!isset(self::$called[__FUNCTION__])) {
         require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
         // Function has been called
         self::$called[__FUNCTION__] = TRUE;
     }
     return _rtrim($str, $charlist);
 }
 public static function rtrim($str, $charlist = NULL)
 {
     if (!isset(UTF8::$called[__FUNCTION__])) {
         require JsonApiApplication::find_file("utf8", __FUNCTION__);
         // Function has been called
         UTF8::$called[__FUNCTION__] = TRUE;
     }
     return _rtrim($str, $charlist);
 }
Beispiel #3
0
 /**
  * Strips whitespace (or other UTF-8 characters) from the end of a string.
  * @see http://php.net/rtrim
  *
  * @author  Andreas Gohr <*****@*****.**>
  *
  * @param   string   input string
  * @param   string   string of characters to remove
  * @return  string
  */
 public static function rtrim($str, $charlist = NULL)
 {
     require_once dirname(__FILE__) . '/' . __FUNCTION__ . '.php';
     return _rtrim($str, $charlist);
 }
Beispiel #4
0
 /**
  * Strips whitespace (or other UTF-8 characters) from the end of a string.
  * This is a UTF8-aware version of [rtrim](http://php.net/rtrim).
  *
  *     $str = UTF8::rtrim($str);
  *
  * @author  Andreas Gohr <*****@*****.**>
  * @param   string  $str        input string
  * @param   string  $charlist   string of characters to remove
  * @return  string
  */
 public static function rtrim($str, $charlist = NULL)
 {
     if (!isset(UTF8::$called[__FUNCTION__])) {
         require Kohana::find_file('utf8', __FUNCTION__);
         // Function has been called
         UTF8::$called[__FUNCTION__] = TRUE;
     }
     return _rtrim($str, $charlist);
 }
Beispiel #5
0
 /**
  * Strips whitespace (or other UTF-8 characters) from the end of a string
  *
  * This is a UTF8-aware version of [rtrim](http://php.net/rtrim).
  *
  * Example:
  * ~~~
  * $str = UTF8::rtrim($str);
  * ~~~
  *
  * @author  Andreas Gohr <*****@*****.**>
  *
  * @param   string  $str       Input string
  * @param   string  $charlist  String of characters to remove [Optional]
  *
  * @return  string
  *
  * @uses    Kohana::find_file
  */
 public static function rtrim($str, $charlist = NULL)
 {
     UTF8::_load(__FUNCTION__);
     return _rtrim($str, $charlist);
 }
Beispiel #6
0
 /**
  * Strips whitespace (or other UTF-8 characters) from the end of a string.
  * This is a UTF8-aware version of [rtrim](http://php.net/rtrim).
  *
  *     $str = UTF8::rtrim($str);
  *
  * @author  Andreas Gohr <*****@*****.**>
  * @param   string  $str        input string
  * @param   string  $charlist   string of characters to remove
  * @return  string
  */
 public static function rtrim($str, $charlist = null)
 {
     if (!isset(UTF8::$called[__FUNCTION__])) {
         require Phalcana::$di->get('fs')->findFile('utf8', __FUNCTION__);
         // Function has been called
         UTF8::$called[__FUNCTION__] = true;
     }
     return _rtrim($str, $charlist);
 }