Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3641-3652 (lines=12) @@
3638
   *
3639
   * @return   string The string with unwanted characters stripped from the left
3640
   */
3641
  public static function ltrim($str = '', $chars = INF)
3642
  {
3643
    $str = (string)$str;
3644
3645
    if (!isset($str[0])) {
3646
      return '';
3647
    }
3648
3649
    $chars = INF === $chars ? '\s' : self::rxClass($chars);
3650
3651
    return preg_replace("/^{$chars}+/u", '', $str);
3652
  }
3653
3654
  /**
3655
   * Returns the UTF-8 character with the maximum code point in the given data.
@@ 4086-4097 (lines=12) @@
4083
   *
4084
   * @return   string The string with unwanted characters stripped from the right
4085
   */
4086
  public static function rtrim($str = '', $chars = INF)
4087
  {
4088
    $str = (string)$str;
4089
4090
    if (!isset($str[0])) {
4091
      return '';
4092
    }
4093
4094
    $chars = INF === $chars ? '\s' : self::rxClass($chars);
4095
4096
    return preg_replace("/{$chars}+$/u", '', $str);
4097
  }
4098
4099
  /**
4100
   * rxClass