Code Duplication    Length = 4-4 lines in 2 locations

src/Stringy.php 2 locations

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