Code Duplication    Length = 15-15 lines in 2 locations

includes/libraries/protect/AntiXSS/UTF8.php 2 locations

@@ 4509-4523 (lines=15) @@
4506
   *
4507
   * @return bool
4508
   */
4509
  public static function str_istarts_with($haystack, $needle)
4510
  {
4511
    $haystack = (string)$haystack;
4512
    $needle = (string)$needle;
4513
4514
    if (!isset($haystack[0], $needle[0])) {
4515
      return false;
4516
    }
4517
4518
    if (self::stripos($haystack, $needle) === 0) {
4519
      return true;
4520
    }
4521
4522
    return false;
4523
  }
4524
4525
  /**
4526
   * Limit the number of characters in a string, but also after the next word.
@@ 4795-4809 (lines=15) @@
4792
   *
4793
   * @return bool
4794
   */
4795
  public static function str_starts_with($haystack, $needle)
4796
  {
4797
    $haystack = (string)$haystack;
4798
    $needle = (string)$needle;
4799
4800
    if (!isset($haystack[0], $needle[0])) {
4801
      return false;
4802
    }
4803
4804
    if (self::strpos($haystack, $needle) === 0) {
4805
      return true;
4806
    }
4807
4808
    return false;
4809
  }
4810
4811
  /**
4812
   * Get a binary representation of a specific string.