Code Duplication    Length = 15-15 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4615-4629 (lines=15) @@
4612
   *
4613
   * @return bool
4614
   */
4615
  public static function str_istarts_with($haystack, $needle)
4616
  {
4617
    $haystack = (string)$haystack;
4618
    $needle = (string)$needle;
4619
4620
    if (!isset($haystack[0], $needle[0])) {
4621
      return false;
4622
    }
4623
4624
    if (self::stripos($haystack, $needle) === 0) {
4625
      return true;
4626
    }
4627
4628
    return false;
4629
  }
4630
4631
  /**
4632
   * Limit the number of characters in a string, but also after the next word.
@@ 4901-4915 (lines=15) @@
4898
   *
4899
   * @return bool
4900
   */
4901
  public static function str_starts_with($haystack, $needle)
4902
  {
4903
    $haystack = (string)$haystack;
4904
    $needle = (string)$needle;
4905
4906
    if (!isset($haystack[0], $needle[0])) {
4907
      return false;
4908
    }
4909
4910
    if (strpos($haystack, $needle) === 0) {
4911
      return true;
4912
    }
4913
4914
    return false;
4915
  }
4916
4917
  /**
4918
   * Get a binary representation of a specific string.