1 | <?php |
||
7 | class Str |
||
8 | { |
||
9 | /** |
||
10 | * Determine if a given string ends with a given substring. |
||
11 | * |
||
12 | * @param string $haystack |
||
13 | * @param string|array $needles |
||
14 | * |
||
15 | * @return bool |
||
16 | */ |
||
17 | 1 | public static function endsWith(string $haystack, $needles): bool |
|
27 | |||
28 | /** |
||
29 | * Generate a more truly "random" alpha-numeric string. |
||
30 | * |
||
31 | * @param int $length |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | 2 | public static function random(int $length = 16): string |
|
46 | |||
47 | /** |
||
48 | * Convert the given string to lower-case. |
||
49 | * |
||
50 | * @param string $value |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | 3 | public static function lower($value) |
|
58 | } |
||
59 |