Code Duplication    Length = 4-4 lines in 2 locations

src/Stringy.php 2 locations

@@ 507-510 (lines=4) @@
504
  {
505
    $str = $this->str;
506
507
    if (!$caseSensitive) {
508
      $substring = UTF8::strtolower($substring, $this->encoding);
509
      $str = UTF8::strtolower($this->str, $this->encoding);
510
    }
511
512
    return UTF8::strpos($str, $substring, $this->encoding) === 0;
513
  }
@@ 581-584 (lines=4) @@
578
        $this->encoding
579
    );
580
581
    if (!$caseSensitive) {
582
      $substring = UTF8::strtolower($substring, $this->encoding);
583
      $endOfStr = UTF8::strtolower($endOfStr, $this->encoding);
584
    }
585
586
    return (string)$substring === $endOfStr;
587
  }