196 bool absolute_path(
string path);
213 bool absolute_path_unix(
string path);
230 bool absolute_path_windows(
string path);
234 const ParenMap = (
")":
"(",
"}":
"{",
"]":
"[",);
235 const FwdParenMap = map {$1.value: $1.key}, ParenMap.pairIterator();
238 const ET_RawString = 0;
239 const ET_QuotedString = 1;
240 const ET_BracketString = 2;
244 ET_RawString:
"raw string",
245 ET_QuotedString:
"quoted string",
246 ET_BracketString:
"bracket expression",
252 list scan_exp(
string arg);
256 hash eval_text(
string arg,
bool err =
False);
262 any parse_to_basic_value(*
string arg);
365 const StorageNames = (
"Kilo",
"Mega",
"Giga",
"Tera",
"Peta",
"Exa",
"Zetta",
"Yotta",
"Bronto");
459 string lpad(softstring text,
int length,
string padding =
' ');
478 string rpad(softstring text,
int length,
string padding =
' ');
516 string plural(
int count,
string base,
string singular =
"",
string plural =
"s");
string get_exception_string(hash ex)
returns a multi-line string from the exception hash argument suitable for logging or output on the co...
string normalize_dir_windows(string dir, string cwd=getcwd())
returns a normalized Windows path name (eliminates ".", "..", and "//")
string normalize_dir(string dir, string cwd=getcwd())
returns a platform-specific normalized path name (starting from /, eliminates ".", "..", and "//")
any parse_to_qore_value(string arg)
tries to convert a string (such as an argument given from the command-line) to a Qore value ...
string plural(int count, string base, string singular="", string plural="s")
Returns string with number and proper singular/plural form of noun.
string glob_to_regex(string pat)
Translates a shell pattern to a regular expression.
string rpad(softstring text, int length, string padding= ' ')
Returns a string right-padded to a specified length with the specified characters.
list zip()
Returns a list of lists, where the i-th list contains the i-th element from each of the argument list...
string get_byte_size(softnumber n, int decimals=2)
returns a string giving a user-friendly real storage size (ie based on 1KiB = 1024 bytes) in KiB...
string normalize_dir_unix(string dir, string cwd=getcwd())
returns a normalized UNIX path name (starting from /, eliminates ".", "..", and "//") ...
string tmp_location()
Returns a path for temporary files.
const StorageNames
storage names (Geop, which would normally follow Bronto, is excluded as the abbreviation would be GB/...
Definition: Util.qm.dox.h:365
string lpad(softstring text, int length, string padding= ' ')
Returns a string left-padded to a specified length with the specified characters. ...
string regex_escape(string text)
Escapes (backslashes) all non-alphanumeric characters in a string.
bool same(list l)
checks whether given list has only uniq element
int compare_version(string lv, string rv)
compares complex versions by breaking down strings into component parts
string ordinal(int i)
Returns string with partially textual representation of ordinal integer value.
string get_random_string(softint len=15, int level=3)
function that returns a random string
list slice(list l, softlist indices)
list slice implementation
int length(softstring str)
string get_marketing_byte_size(softnumber n, int decimals=2)
returns a string giving a user-friendly "marketing storage" size (ie based on 1KB = 1000 bytes) in KB...