util_string.jsSummary: Random functions for creating, manipulating and analyzing strings.
| Function | Summary |
isNum |
Is the provided string a legal number? |
isEml |
Is the provided string a properly-formatted email address? |
trmChr |
Trim all contiguous instances of the provided character from the ends of a string |
gtCd4V |
Get the provided value returned as a string, and suitable for insertion into code. |
util_string.js: OverviewRandom functions for creating, manipulating and analyzing strings.
util_string.isNum()Is the provided string a legal number?
s_potential: The string to analyze. REQUIREDbs_decimalAllowed: Is the potential number allowed to be a decimal? If 'true', then yes. If 'false', no. REQUIRED.true if...false if otherwise-101-5087503287540000875032875408750328754-487584758475235-0000000487584758475235-04875847584752354875847-58475235487584758475235-[EMPTY_STRING]a0--0Not a number!!!Some 123 numbers 456123 456-0.0-.0-0.000000-.0000001.1.11.000830847018374058763408562473.01837486564417308746.1.0.01-1.0isNum(s_potential, bs_decimalAllowed)
util_string.isEml()Is the provided string a properly-formatted email address?
A 'bad' email has any of the following characteruistics:
undefined or zero characters in length.s_potentialEmail: The string to check for email-ness. REQUIRED.true if s_potentialEmail
false if not.bla@bloo.combla.blee@bloo.blay.combla_blee@bloo_blay.comx@x.xx.x.x.x.x.@x.x.x.x.x.x.x.x.xx@.@@..@..@bla @ bloo . com [A SPACE]bla@bloo.com bla@bl oo.combla.@.bloo.combla@bloo.combla@bloo.comisEml(s_potentialEmail)
util_string.trmChr()Trim all contiguous instances of the provided character from the ends of a string
c_harToTrim: The character to trim off of s_tring. REQUIRED and must be a character/string-of-length-one.s_tring: The string to trim. REQUIRED.trmChr(c_harToTrim, s_tring)
util_string.gtCd4V()Get the provided value returned as a string, and suitable for insertion into code.
s_value: The value to code-ize."undefined" when s_value is undefined.s_value when s_value is a number."['" + s_value.join("', '") + "']" when s_value is an array."'" + s_value + "'" if otherwise.gtCd4V(s_value)