parent
9bc53b958f
commit
86827d1983
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Silex\Router;
|
||||
|
||||
final class PathHelper
|
||||
{
|
||||
public static function removeEverythingAfter(string $str, string $char): string
|
||||
{
|
||||
$pos = strpos($str, $char);
|
||||
if ($pos !== false) {
|
||||
return substr($str, 0, $pos);
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue