Module vlib.helpers.vString
Strip leading and/or trailing character from string
Functions
strip_line (str, patt) | Strip line matching pattern, from multiline string |
string_to_percentage (str) | |
get_sortable_time (tstamp) | sortable time - date which can be sorted alphabetically |
table_to_string (t, multiline) | present a lua table as a formatted string |
Functions
- strip_line (str, patt)
-
Strip line matching pattern, from multiline string
Parameters:
- str (string)
- patt (string)
Returns:
- str, resulting string
- int, #stripped lines
- string_to_percentage (str)
-
Parameters:
- str (string), e.g. "33.3%"
- get_sortable_time (tstamp)
-
sortable time - date which can be sorted alphabetically
Parameters:
- tstamp [[
Returns:
-
string
- table_to_string (t, multiline)
-
present a lua table as a formatted string
Parameters:
- t (table)
- multiline (bool) if false, create single-line string
Returns:
-
string