Code Duplication    Length = 4-4 lines in 2 locations

src/Stringy.php 2 locations

@@ 512-515 (lines=4) @@
509
  {
510
    $str = $this->str;
511
512
    if (!$caseSensitive) {
513
      $substring = UTF8::strtolower($substring, $this->encoding);
514
      $str = UTF8::strtolower($this->str, $this->encoding);
515
    }
516
517
    return UTF8::strpos($str, $substring, $this->encoding) === 0;
518
  }
@@ 585-588 (lines=4) @@
582
        $this->encoding
583
    );
584
585
    if (!$caseSensitive) {
586
      $substring = UTF8::strtolower($substring, $this->encoding);
587
      $endOfStr = UTF8::strtolower($endOfStr, $this->encoding);
588
    }
589
590
    return (string)$substring === $endOfStr;
591
  }