Code Duplication    Length = 15-15 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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