trim.php 369 B

1234567891011121314151617
  1. <?php
  2. /**
  3. * UTF8::trim
  4. *
  5. * @package Kohana
  6. * @author Kohana Team
  7. * @copyright (c) Kohana Team
  8. * @copyright (c) 2005 Harry Fuecks
  9. * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
  10. */
  11. function _trim($str, $charlist = NULL)
  12. {
  13. if ($charlist === NULL)
  14. return trim($str);
  15. return UTF8::ltrim(UTF8::rtrim($str, $charlist), $charlist);
  16. }