| 1 | <?php |
||
| 3 | class StringFunctions |
||
| 4 | { |
||
| 5 | /** |
||
| 6 | * @param string $string |
||
| 7 | * @return string |
||
| 8 | */ |
||
| 9 | 1 | private static function mb_ucfirst($string) |
|
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Formats a string to be used as a username. |
||
| 21 | * @param $username |
||
| 22 | * @return string |
||
| 23 | */ |
||
| 24 | 1 | public static function formatAsUsername($username) |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Formats a string to be used as an email (specifically strips whitespace |
||
| 35 | * from the beginning/end of the Email, as well as immediately before/after |
||
| 36 | * the @ in the Email). |
||
| 37 | * @param $email |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | 1 | public static function formatAsEmail($email) |
|
| 46 | } |
||
| 47 | |||
| 48 | } |
||
| 49 |