1 | <?php |
||
5 | class StringUtils |
||
6 | { |
||
7 | /** |
||
8 | * Return the translation pattern with keys "{admin}" and "{key}" replaced by their values. |
||
9 | * |
||
10 | * @param string $translationPattern |
||
11 | * @param string $adminName |
||
12 | * @param string $key |
||
13 | * |
||
14 | * @return string |
||
15 | */ |
||
16 | public static function getTranslationKey( |
||
26 | |||
27 | /** |
||
28 | * Camelize a string. |
||
29 | * |
||
30 | * @param string $id A string to camelize |
||
31 | * |
||
32 | * @return string The camelized string |
||
33 | */ |
||
34 | public static function camelize($id): string |
||
38 | |||
39 | /** |
||
40 | * A string to underscore. |
||
41 | * |
||
42 | * @param string $id The string to underscore |
||
43 | * |
||
44 | * @return string The underscored string |
||
45 | */ |
||
46 | public static function underscore($id): string |
||
58 | |||
59 | /** |
||
60 | * Return true if the given string starts with $start. |
||
61 | * |
||
62 | * @param string $string |
||
63 | * @param string $start |
||
64 | * |
||
65 | * @return bool |
||
66 | */ |
||
67 | public static function startWith(string $string, string $start): bool |
||
71 | } |
||
72 |