The namespace for all UF/String utility functions, typically for static methods.
- Source:
Methods
getDate(arg0_string) → {Date}
Returns a string timestamp of a contemporary date.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_string |
string
|
Returns:
- Type:
-
Date
getNesting(arg0_string) → {number}
Fetches the amount of nesting embedded within the current string.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_string |
string
|
Returns:
- Type:
-
number
splitIndex(arg0_string, arg1_index) → {Array.<string>}
Splits a string in two based on a character index. Returns a string[] with a length of 2.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_string |
string
|
|
arg1_index |
number
|
Returns:
- Type:
-
Array.<string>
(static) capitalise(arg0_string) → {string}
Capitalises all the words in a string.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_string |
string
|
Returns:
- Type:
-
string
(static) cleanStringify(arg0_input_object) → {string}
Cleans an input object to be compatible with JSON.stringify().
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_input_object |
Object
|
Returns:
- Type:
-
string
(static) equalsIgnoreCase(arg0_string, arg1_string) → {boolean}
Compares two strings, ignoring their case. Returns a boolean.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_string |
string
|
The string to compare with. |
arg1_string |
string
|
The other string to compare with. |
Returns:
- Type:
-
boolean
(static) formalise() → {string}
Formalises a debug string into human-readable text. Returns a string.
- Source:
Returns:
- Type:
-
string
(static) formatArray(arg0_array) → {string}
Formats an array into a string.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_array |
Array
|
Returns:
- Type:
-
string
(static) formatBoolean(arg0_input_boolean) → {string}
Returns a human-readable version of a boolean.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_input_boolean |
boolean
|
Returns:
- Type:
-
string
(static) formatDate(arg0_dateopt) → {string}
Formats a Date object into a default string.
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
arg0_date |
Object
|
<optional> |
Returns:
- Type:
-
string
(static) formatDateLength(arg0_seconds) → {string}
Formats a date length into a string given a number of seconds.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_seconds |
number
|
Returns:
- Type:
-
string
(static) formatNumber(arg0_number, arg1_placesopt) → {string}
Formats a number based off of the selected locale, rounding it to the specified number of places.
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
arg0_number |
number
|
|||
arg1_places |
number
|
<optional> |
0 |
Returns:
- Type:
-
string
(static) formatObject(arg0_object) → {string}
Formats an object as a given string.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_object |
Object
|
Returns:
- Type:
-
string
(static) formatTypeName(arg0_value) → {string}
Formats the type name of a given value based off its actual JS type.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_value |
any
|
Returns:
- Type:
-
string
(static) getDateString(arg0_dateopt, arg1_optionsopt)
Returns a given Date as a timestamp string.
- Source:
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg0_date |
Date
|
any
|
<optional> |
new Date() | |||||||||||
arg1_options |
Object
|
<optional> |
|
(static) getSpreadsheetCell(arg0_x, arg1_y) → {string}
Returns spreadsheet formatted coords (i.e. 'A1', 'ZZ15') given a numeric coords pair (1-indexed).
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_x |
number
|
|
arg1_y |
number
|
Returns:
- Type:
-
string
(static) getSpreadsheetColumn(arg0_x) → {string}
Returns the spreadsheet column (i.e. 'A', 'ZZ') given an X coordinate number.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_x |
number
|
Returns:
- Type:
-
string
(static) hash(arg0_string) → {string}
Hashes a string for later checks whether a string is equivalent to another.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_string |
string
|
Returns:
- Type:
-
string
(static) isImage() → {boolean}
Checks if the given link is that of a compatible image.
- Source:
Returns:
- Type:
-
boolean
(static) isURL() → {boolean}
Checks whether a given string is loosely a valid URL.
- Source:
Returns:
- Type:
-
boolean
(static) ordinalise(arg0_number) → {string}
Ordinalises a given number and returns it as a string.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_number |
number
|
Returns:
- Type:
-
string
(static) parseEuropeanNumber(arg0_string) → {number|string}
Parses a European number string to a number.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_string |
string
|
Returns:
- Type:
-
number|string
(static) parseList(arg0_input_list) → {string}
Parses a list into human-readable form.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_input_list |
Array.<string>
|
Returns:
- Type:
-
string
(static) processOrdinal() → {string}
Fetches the current ordinal present in a numeric string.
- Source:
Returns:
- Type:
-
string
(static) splitByCharacterCount(arg0_string, arg1_lengthopt) → {Array.<string>}
Splits a string equally by character count.
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
arg0_string |
string
|
|||
arg1_length |
number
|
<optional> |
200 |
Returns:
- Type:
-
Array.<string>
(static) splitMarkdown(arg0_string, arg1_optionsopt) → {Array.<string>}
Splits a string according to Markdown, preserving lists, with \n as breakpoints.
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg0_string |
string
|
||||||||||||||||||||||
arg1_options |
Object
|
<optional> |
|
Returns:
- Type:
-
Array.<string>
(static) stripMarkdown() → {string}
Strips Markdown from a string.
- Source:
Returns:
- Type:
-
string
(static) stripNonNumerics(arg0_string) → {string}
Strips all non-numeric characters (0-9) from a string.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_string |
string
|
Returns:
- Type:
-
string
(static) truncate(arg0_string, arg1_number, arg2_ellipsisopt) → {string}
Truncates a string to a given length, appending the ellipsis afterwards.
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
arg0_string |
string
|
|||
arg1_number |
number
|
|||
arg2_ellipsis |
string
|
<optional> |
" ..." |
Returns:
- Type:
-
string