| @@ 440-449 (lines=10) @@ | ||
| 437 | * |
|
| 438 | * @return boolean |
|
| 439 | */ |
|
| 440 | public function startsWith($input, $expected) |
|
| 441 | { |
|
| 442 | $length = strlen($expected); |
|
| 443 | ||
| 444 | if ($length === 0) { |
|
| 445 | return true; |
|
| 446 | } |
|
| 447 | ||
| 448 | return (substr($input, 0, $length) === $expected); |
|
| 449 | } |
|
| 450 | ||
| 451 | /** |
|
| 452 | * The input value doesn't start with the expected value |
|
| @@ 472-481 (lines=10) @@ | ||
| 469 | * |
|
| 470 | * @return boolean |
|
| 471 | */ |
|
| 472 | public function endsWith($input, $expected) |
|
| 473 | { |
|
| 474 | $length = strlen($expected); |
|
| 475 | ||
| 476 | if ($length === 0) { |
|
| 477 | return true; |
|
| 478 | } |
|
| 479 | ||
| 480 | return (substr($input, -$length) === $expected); |
|
| 481 | } |
|
| 482 | ||
| 483 | /** |
|
| 484 | * The input value doesn't end with the expected value |
|