ZMLangUtils
public class ZMLangUtils
| Method Summary | |
|---|---|
| static boolean | asBoolean(mixed value) Evaluate a string value as boolean. |
| static boolean | endsWith(string s, string end) Check if the given string ends with the provided string. |
| static boolean | inArray(string value, mixed array) Check if the given value exists in the array or comma separated list. |
| static boolean | isEmpty(mixed value) Check if a given value or array is empty. |
| static string | mkUnique(var arg) Create a unique key from all given parameters. |
| static boolean | startsWith(string s, string start) Check if the given string starts with the provided string. |
| static array | toArray(mixed value) Convert values to array where reasonable. |
public static boolean asBoolean(mixed value)
Evaluate a string value as boolean.
public static boolean endsWith(string s, string end)
Check if the given string ends with the provided string.
true if $s ends with $start, false if not.public static boolean inArray(string value, mixed array)
Check if the given value exists in the array or comma separated list.
array or a string containing a comma separated list.true if the given value exists in the array, false if not.public static boolean isEmpty(mixed value)
Check if a given value or array is empty.
true if the value is empty or null, false if not.public static string mkUnique(var arg)
Create a unique key from all given parameters.
public static boolean startsWith(string s, string start)
Check if the given string starts with the provided string.
true if $s starts with $start, false if not.public static array toArray(mixed value)
Convert values to array where reasonable.
Language utils.