1 | <?php |
||
10 | trait StringFn |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * Concat - Return a concatinated string of all function arguments provided |
||
15 | * @return string $str concatinated string |
||
16 | */ |
||
17 | 1 | public static function mysql_concat() |
|
18 | { |
||
19 | 1 | $str = ''; |
|
20 | 1 | foreach (func_get_args() as $arg) { |
|
21 | 1 | $str .= $arg; |
|
22 | } |
||
23 | 1 | return $str; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * Concat_ws - Return a concatinated string of all function arguments provided |
||
28 | * it will use the first argument as the seperator |
||
29 | * @return string $str concactinated string with seperator |
||
30 | */ |
||
31 | 1 | public static function mysql_concat_ws() |
|
38 | |||
39 | |||
40 | /** |
||
41 | * Format - Return a formated number string based on the arguements provided |
||
42 | * Ignoring the functionality of a third argument, locale |
||
43 | * https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_format |
||
44 | * @return string $str formatted as per arg |
||
45 | */ |
||
46 | 1 | public static function mysql_format() |
|
53 | } |
||
54 |