Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3798-3809 (lines=12) @@
3795
   *
3796
   * @return   string The string with unwanted characters stripped from the left
3797
   */
3798
  public static function ltrim($str = '', $chars = INF)
3799
  {
3800
    $str = (string)$str;
3801
3802
    if (!isset($str[0])) {
3803
      return '';
3804
    }
3805
3806
    $chars = INF === $chars ? '\s' : self::rxClass($chars);
3807
3808
    return preg_replace("/^{$chars}+/u", '', $str);
3809
  }
3810
3811
  /**
3812
   * Returns the UTF-8 character with the maximum code point in the given data.
@@ 4266-4277 (lines=12) @@
4263
   *
4264
   * @return   string The string with unwanted characters stripped from the right
4265
   */
4266
  public static function rtrim($str = '', $chars = INF)
4267
  {
4268
    $str = (string)$str;
4269
4270
    if (!isset($str[0])) {
4271
      return '';
4272
    }
4273
4274
    $chars = INF === $chars ? '\s' : self::rxClass($chars);
4275
4276
    return preg_replace("/{$chars}+$/u", '', $str);
4277
  }
4278
4279
  /**
4280
   * rxClass