Code Duplication    Length = 4-4 lines in 2 locations

src/Stringy.php 2 locations

@@ 486-489 (lines=4) @@
483
  {
484
    $str = $this->str;
485
486
    if (!$caseSensitive) {
487
      $substring = UTF8::strtolower($substring, $this->encoding);
488
      $str = UTF8::strtolower($this->str, $this->encoding);
489
    }
490
491
    return UTF8::strpos($str, $substring, $this->encoding) === 0;
492
  }
@@ 535-538 (lines=4) @@
532
        $this->encoding
533
    );
534
535
    if (!$caseSensitive) {
536
      $substring = UTF8::strtolower($substring, $this->encoding);
537
      $endOfStr = UTF8::strtolower($endOfStr, $this->encoding);
538
    }
539
540
    return (string)$substring === $endOfStr;
541
  }