Code Duplication    Length = 4-4 lines in 2 locations

src/Stringy.php 2 locations

@@ 492-495 (lines=4) @@
489
  {
490
    $str = $this->str;
491
492
    if (!$caseSensitive) {
493
      $substring = UTF8::strtolower($substring, $this->encoding);
494
      $str = UTF8::strtolower($this->str, $this->encoding);
495
    }
496
497
    return UTF8::strpos($str, $substring, $this->encoding) === 0;
498
  }
@@ 566-569 (lines=4) @@
563
        $this->encoding
564
    );
565
566
    if (!$caseSensitive) {
567
      $substring = UTF8::strtolower($substring, $this->encoding);
568
      $endOfStr = UTF8::strtolower($endOfStr, $this->encoding);
569
    }
570
571
    return (string)$substring === $endOfStr;
572
  }