Code Duplication    Length = 15-15 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4602-4616 (lines=15) @@
4599
   *
4600
   * @return bool
4601
   */
4602
  public static function str_istarts_with($haystack, $needle)
4603
  {
4604
    $haystack = (string)$haystack;
4605
    $needle = (string)$needle;
4606
4607
    if (!isset($haystack[0], $needle[0])) {
4608
      return false;
4609
    }
4610
4611
    if (self::stripos($haystack, $needle) === 0) {
4612
      return true;
4613
    }
4614
4615
    return false;
4616
  }
4617
4618
  /**
4619
   * Limit the number of characters in a string, but also after the next word.
@@ 4888-4902 (lines=15) @@
4885
   *
4886
   * @return bool
4887
   */
4888
  public static function str_starts_with($haystack, $needle)
4889
  {
4890
    $haystack = (string)$haystack;
4891
    $needle = (string)$needle;
4892
4893
    if (!isset($haystack[0], $needle[0])) {
4894
      return false;
4895
    }
4896
4897
    if (strpos($haystack, $needle) === 0) {
4898
      return true;
4899
    }
4900
4901
    return false;
4902
  }
4903
4904
  /**
4905
   * Get a binary representation of a specific string.