Code Duplication    Length = 4-4 lines in 2 locations

src/Stringy.php 2 locations

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