Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3771-3782 (lines=12) @@
3768
   *
3769
   * @return   string The string with unwanted characters stripped from the left
3770
   */
3771
  public static function ltrim($str = '', $chars = INF)
3772
  {
3773
    $str = (string)$str;
3774
3775
    if (!isset($str[0])) {
3776
      return '';
3777
    }
3778
3779
    $chars = INF === $chars ? '\s' : self::rxClass($chars);
3780
3781
    return preg_replace("/^{$chars}+/u", '', $str);
3782
  }
3783
3784
  /**
3785
   * Returns the UTF-8 character with the maximum code point in the given data.
@@ 4249-4260 (lines=12) @@
4246
   *
4247
   * @return   string The string with unwanted characters stripped from the right
4248
   */
4249
  public static function rtrim($str = '', $chars = INF)
4250
  {
4251
    $str = (string)$str;
4252
4253
    if (!isset($str[0])) {
4254
      return '';
4255
    }
4256
4257
    $chars = INF === $chars ? '\s' : self::rxClass($chars);
4258
4259
    return preg_replace("/{$chars}+$/u", '', $str);
4260
  }
4261
4262
  /**
4263
   * rxClass