Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4799-4810 (lines=12) @@
4796
   *
4797
   * @return bool
4798
   */
4799
  public static function str_istarts_with(string $haystack, string $needle): bool
4800
  {
4801
    if (!isset($haystack[0], $needle[0])) {
4802
      return false;
4803
    }
4804
4805
    if (self::stripos($haystack, $needle) === 0) {
4806
      return true;
4807
    }
4808
4809
    return false;
4810
  }
4811
4812
  /**
4813
   * Returns true if the string begins with any of $substrings, false otherwise.
@@ 5118-5129 (lines=12) @@
5115
   *
5116
   * @return bool
5117
   */
5118
  public static function str_starts_with(string $haystack, string $needle): bool
5119
  {
5120
    if (!isset($haystack[0], $needle[0])) {
5121
      return false;
5122
    }
5123
5124
    if (\strpos($haystack, $needle) === 0) {
5125
      return true;
5126
    }
5127
5128
    return false;
5129
  }
5130
5131
  /**
5132
   * Returns true if the string begins with any of $substrings, false otherwise.