Qore Programming Language Reference Manual 2.0.0
|
Functions | |
string | Qore::backquote (string cmd, __7_ reference< int > rc) |
Executes a process and returns a string of the output (stdout only) | |
nothing | Qore::backquote () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
auto | Qore::call_builtin_function (string name,...) |
Calls a function and returns the return value, passing the remaining arguments after the function name to the builtin function. | |
auto | Qore::call_builtin_function_args (string name, __7_ softlist< auto > vargs) |
Calls a function and returns the return value, using the optional second argument as a list of arguments for the function. | |
auto | Qore::call_function (string name,...) |
Calls a function and returns the return value, passing the remaining arguments after the function name to the function. | |
auto | Qore::call_function (code f,...) |
Calls the given call reference or closure and returns the result, passing the remaining arguments to the call reference or closure. | |
auto | Qore::call_function_args (string name, __7_ softlist< auto > vargs) |
Calls a function and returns the return value, using the optional second argument as a list of arguments for the function. | |
auto | Qore::call_function_args (code f, __7_ softlist< auto > vargs) |
Calls the given call reference or closure and returns the result, using the optional second argument as a list of arguments to the call reference or closure. | |
string | Qore::decode_uri_request (string uri) |
Decodes percent-encoded codes in a URI path and converts "+" signs in the query component to spaces and returns the decoded string in UTF-8 encoding. | |
string | Qore::decode_url (string url) |
Decodes percent numeric codes in a URL string and returns the decoded string in UTF-8 encoding. | |
nothing | Qore::decode_url () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
string | Qore::encode_uri_request (string url) |
Encodes URI requests by substituting special characters in the path with percent-encoded equivalents and substituting spaces with "+" and "+" with the percent-encoded equivalent in the URI query component. | |
string | Qore::encode_url (string url, softbool encode_all=False) |
Encodes URLs by substituting '%' characters with '%25' , spaces (' ') with '%20' , and non-ascii characters by percent-encoded representations. | |
bool | Qore::exists (...) |
A function performing the same role as the exists operator. | |
bool | Qore::existsFunction (string name) |
Returns True if the function exists in the current program's function name space. | |
bool | Qore::existsFunction (code c) |
Always returns True. | |
nothing | Qore::existsFunction () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
bool | Qore::exists_function (string name) |
Returns True if the function exists in the current program's function name space. | |
bool | Qore::exists_function (code c) |
Always returns True. | |
__7_ string | Qore::functionType (string name) |
Returns "builtin" (for a builtin function), "user" (for a user function), or NOTHING (if the function cannot be found) according to the function name passed. | |
nothing | Qore::functionType () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
__7_ string | Qore::function_type (string name) |
Returns "builtin" (for a builtin function), "user" (for a user function), or NOTHING (if the function cannot be found) according to the function name passed. | |
__7_ int | Qore::getByte (string str, softint offset=0) |
Returns the byte value at the given byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
nothing | Qore::getByte () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
__7_ int | Qore::getByte (binary b, softint offset=0) |
Returns the byte value at the given byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
string | Qore::getClassName (object obj) |
Returns the class name of the object passed. | |
nothing | Qore::getClassName () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
list< string > | Qore::getFeatureList () |
Returns a list of strings of the builtin and module-supplied features of Qore. | |
hash< string, hash< auto > > | Qore::getModuleHash () |
Returns a hash of hashes describing the currently-loaded Qore modules; the top-level hash keys are the module names. | |
list< hash< auto > > | Qore::getModuleList () |
Returns a list of hashes describing the currently-loaded Qore modules. | |
__7_ int | Qore::getWord32 (string str, softint offset=0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::getWord32 (binary b, softint offset=0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
nothing | Qore::getWord32 () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
__7_ int | Qore::get_byte (string str, softint offset=0) |
Returns the byte value at the given byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_byte (binary b, softint offset=0) |
Returns the byte value at the given byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
code | Qore::get_call_reference (string identifier) |
resolve the string as a call reference | |
string | Qore::get_class_name (object obj) |
Returns the class name of the object passed. | |
string | Qore::get_default_encoding () |
Returns the name of the default character encoding. | |
string | Qore::get_ex_pos (hash< auto > ex) |
returns a descriptive string for an exception location; the source and offset information will also be included in the string returned if present in the ExceptionInfo hash argument | |
list< string > | Qore::get_feature_list () |
Returns a list of strings of the builtin and module-supplied features of Qore. | |
hash< auto > | Qore::get_global_vars () |
returns a hash of global variables | |
hash< auto > | Qore::get_local_vars (int frame) |
retrieves a hash of local variables for the given stack frame | |
hash< string, hash< auto > > | Qore::get_module_hash () |
Returns a hash of hashes describing the currently-loaded Qore modules; the top-level hash keys are the module names. | |
list< hash< auto > > | Qore::get_module_list () |
Returns a list of hashes describing the currently-loaded Qore modules. | |
auto | Qore::get_module_option (string module, string option) |
returns the given global module option | |
int | Qore::get_parse_options () |
returns the current parse options for the current Program object | |
hash< auto > | Qore::get_qore_library_info () |
Returns a hash of library build and version info. | |
hash< string, hash< auto > > | Qore::get_qore_option_hash () |
Returns a hash of hashes giving information about Qore library options for the current build. | |
list< hash< auto > > | Qore::get_qore_option_list () |
Returns a list of hashes giving information about Qore library options for the current build. | |
string | Qore::get_safe_url (string url) |
Returns the URL string passed without any password information. | |
__7_ string | Qore::get_script_dir () |
Returns the name of the directory from which the current script was executed or NOTHING if unknown (i.e. no parent script, script read from stdin, etc) | |
__7_ string | Qore::get_script_name () |
Returns the filename of the current script if known or NOTHING if unknown (i.e. no parent script, script read from stdin, etc) | |
__7_ string | Qore::get_script_path () |
Returns the path (directory and filename) of the current script or NOTHING if unknown (i.e. no parent script, script read from stdin, etc) | |
__7_ int | Qore::get_word_16 (string str, softint offset=0) |
Returns the 16-bit integer value at the given 2-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_16 (binary b, softint offset=0) |
Returns the 16-bit integer value at the given 2-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_16_lsb (string str, softint offset=0) |
Returns the 16-bit integer value at the given 2-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_16_lsb (binary b, softint offset=0) |
Returns the 16-bit integer value at the given 2-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_32 (string str, softint offset=0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_32 (binary b, softint offset=0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_32_lsb (string str, softint offset=0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_32_lsb (binary b, softint offset=0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_64 (string str, softint offset=0) |
Returns the 64-bit integer value at the given 8-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_64 (binary b, softint offset=0) |
Returns the 64-bit integer value at the given 8-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_64_lsb (string str, softint offset=0) |
Returns the 64-bit integer value at the given 8-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
__7_ int | Qore::get_word_64_lsb (binary b, softint offset=0) |
Returns the 64-bit integer value at the given 8-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data. | |
bool | Qore::has_key (hash< auto > h, string key) |
Returns True if the given key exists in the hash (does not necessarily have to have a value assigned); exceptions are only raised if string encoding errors are encountered. | |
bool | Qore::has_key (object obj, string key) |
Returns True if the given key exists in the object (does not necessarily have to have a value assigned); exceptions are only raised if string encoding errors are encountered or in case of object access errors. | |
list< auto > | Qore::hash_values (hash< auto > h) |
Returns a list of all the values in the hash argument passed. | |
nothing | Qore::hash_values () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
int | Qore::hextoint (string str) |
Returns an integer for a hexadecimal string value; throws an exception if non-hex digits are found. | |
nothing | Qore::hextoint () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
string | Qore::html_decode (string str) |
Returns a string with any HTML escape codes translated to the original characters. | |
nothing | Qore::html_decode () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
string | Qore::html_encode (string str) |
Returns a string with characters needing HTML escaping translated to HTML escape codes. | |
nothing | Qore::html_encode () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
nothing | Qore::load_module (string name, int warning_mask=WARN_MODULES) |
Loads in a Qore module at run-time. | |
nothing | Qore::load_module () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
__7_ hash< ExceptionInfo > | Qore::load_module_warn (string name, int warning_mask=WARN_MODULES) |
Loads in a Qore module at run-time. | |
nothing | Qore::load_user_module_with_program (string name, Qore::Program pgm) |
Loads in a Qore user module at run-time with using the given Program object as the container for the user module code. | |
string | Qore::makeBase64String (string str, softint maxlinelen=-1) |
Returns a base64-encoded representation of a string. | |
string | Qore::makeBase64String (binary bin, softint maxlinelen=-1) |
Returns a base64-encoded representation of a binary object. | |
nothing | Qore::makeBase64String () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
string | Qore::makeHexString (string str) |
Returns a hex-encoded representation of a string. | |
string | Qore::makeHexString (binary bin) |
Returns a hex-encoded representation of a binary object. | |
nothing | Qore::makeHexString () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
string | Qore::make_base64_string (string str, softint maxlinelen=-1) |
Returns a base64-encoded representation of a string. | |
string | Qore::make_base64_string (binary bin, softint maxlinelen=-1) |
Returns a base64-encoded representation of a binary object. | |
string | Qore::make_base64_url_string (string str) |
Returns a base64-url-encoded representation of a string. | |
string | Qore::make_base64_url_string (binary bin) |
Returns a base64-url-encoded representation of a binary object. | |
string | Qore::make_hex_string (string str) |
Returns a hex-encoded representation of a string. | |
string | Qore::make_hex_string (binary bin) |
Returns a hex-encoded representation of a binary object. | |
__7_ hash< auto > | Qore::parse (string code, string label, __7_ softint warning_mask, __7_ string source, __7_ softint offset, softbool format_label=True) |
Adds the text passed to the current program's code, tagged with the given label. | |
nothing | Qore::parse () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
binary | Qore::parseBase64String (string str) |
Parses a base64 encoded string and returns a binary object of the decoded data. | |
nothing | Qore::parseBase64String () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
string | Qore::parseBase64StringToString (string str, __7_ string encoding) |
Parses a base64 encoded string and returns a string of the decoded data. | |
nothing | Qore::parseBase64StringToString () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
binary | Qore::parseHexString (string hexstr) |
Parses a hex-encoded string and returns the binary object. | |
nothing | Qore::parseHexString () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
__7_ hash< UrlInfo > | Qore::parseURL (string url, bool keep_brackets=False) |
Parses a URL string and returns a hash of the components; if the URL cannot be parsed then NOTHING is returned. | |
nothing | Qore::parseURL () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
binary | Qore::parse_base64_string (string str) |
Parses a base64 encoded string and returns a binary object of the decoded data. | |
string | Qore::parse_base64_string_to_string (string str, __7_ string encoding) |
Parses a base64 encoded string and returns a string of the decoded data. | |
binary | Qore::parse_base64_url_string (string str) |
Parses a base64-url-encoded string and returns a binary object of the decoded data. | |
string | Qore::parse_base64_url_string_to_string (string str, __7_ string encoding) |
Parses a base64-url-encoded string and returns a string of the decoded data. | |
binary | Qore::parse_hex_string (string hexstr) |
Parses a hex-encoded string and returns the binary object. | |
hash< UrlInfo > | Qore::parse_url (string url, bool keep_brackets) |
Parses a URL string and returns a hash of the components. | |
hash< UrlInfo > | Qore::parse_url (string url, __7_ int options) |
Parses a URL string and returns a hash of the components. | |
nothing | Qore::reload_module (string name) |
Reloads an already-loaded Qore module subject to code injection at run-time into Qore; the module's code is not imported into the current Program object. | |
nothing | Qore::set_global_var_value (string name, auto value) |
set the value of a global variable | |
nothing | Qore::set_local_var_value (int frame, string var, auto value) |
sets the value of the given local variable; if the variable cannot be found an exception is raised | |
nothing | Qore::set_module_option (string module, string option, auto value) |
set the given module option | |
Qore::set_return_value (auto val) | |
sets the return value for a Program object when running with %exec-class | |
string | Qore::splice (string str) |
This function always returns an empty string "" . | |
string | Qore::splice (string str, softint start) |
Returns a string based on the argument string but with characters removed from a certain character index. | |
string | Qore::splice (string str, softint start, softint len, __7_ string nstr) |
Returns a string based on the argument string but optionally with characters removed and/or added from a certain character index. | |
list< auto > | Qore::splice (list< auto > l, softint start) |
Returns a list based on the argument list but with elements removed from the given index to the end of the list. | |
list< auto > | Qore::splice (list< auto > l, softint start, softint len) |
Returns a list based on the argument list but optionally with elements removed and/or added from a certain index. | |
list< auto > | Qore::splice (list< auto > l, softint start, softint len, softlist< auto > nlist) |
Returns a list based on the argument list but optionally with elements removed and/or added from a certain index. | |
nothing | Qore::splice () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
int | Qore::strtoint (string num, softint base=10) |
parses a string representing a number in a configurable base and returns the integer | |
nothing | Qore::strtoint () |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. | |
Miscellaneous functions
nothing Qore::backquote | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Executes a process and returns a string of the output (stdout only)
cmd | The shell command to executed as a subprocess |
rc | an optional reference to an integer to return the return code of the process |
BACKQUOTE-ERROR | An error occurred with the fork() or opening the stdout pipe |
Calls a function and returns the return value, passing the remaining arguments after the function name to the builtin function.
name | The name of the builtin function to call |
... | Any optional arguments to the function |
INVALID-FUNCTION-ACCESS | Parse options do not allow access to the function |
NO-FUNCTION | The function does not exist |
Calls a function and returns the return value, using the optional second argument as a list of arguments for the function.
name | The name of the builtin function to call |
vargs | Optionally a single argument to the function or a list of arguments to the function |
INVALID-FUNCTION-ACCESS | Parse options do not allow access to the function |
NO-FUNCTION | The function does not exist |
auto Qore::call_function | ( | code | f, |
... | |||
) |
Calls the given call reference or closure and returns the result, passing the remaining arguments to the call reference or closure.
f | The call reference or closure |
... | Any optional arguments to the call reference or closure |
Calls a function and returns the return value, passing the remaining arguments after the function name to the function.
name | The name of the function to call |
... | Any optional arguments to the function |
INVALID-FUNCTION-ACCESS | Parse options do not allow access to the function |
NO-FUNCTION | The function does not exist |
Calls the given call reference or closure and returns the result, using the optional second argument as a list of arguments to the call reference or closure.
f | The call reference or closure |
vargs | Optionally a single argument to the call reference or closure or a list of arguments to the call reference or closure |
Calls a function and returns the return value, using the optional second argument as a list of arguments for the function.
name | The name of the function to call |
vargs | Optionally a single argument to the function or a list of arguments to the function |
INVALID-FUNCTION-ACCESS | Parse options do not allow access to the function |
NO-FUNCTION | The function does not exist |
Decodes percent-encoded codes in a URI path and converts "+"
signs in the query component to spaces and returns the decoded string in UTF-8 encoding.
uri | a URI request string to decode |
The URI string is divided into three parts:
"?"
or "#"
character"?"
character terminating the path and up to a possible "#"
character"#"
characterFor all parts, any percent-encoded codes (RFC 3986 2.1) are decoded to the corresponinding character. The path component is identified and distinguished by a "?"
or a "#"
character. The path component is subjected to standard percent encoding. The query component is any part of the URI string following a "?"
character up to the end of the URI string or until a "#"
characer is found. The query component is subjected to special decoding for AJAX compatibility; "+"
characters are decoded to ASCII space (therefore any "+"
charaters in the query component of the URI must be encoded with percent encoding, such is the case with Qore::encode_uri_request() for example). The fragment component is identified as any text following a "#"
character, and this is decoded with the same rules as in the path component.
"+"
in the query component of the URI string.nothing Qore::decode_url | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Decodes percent numeric codes in a URL string and returns the decoded string in UTF-8 encoding.
url | a URL string with percent-encodings to decode |
Encodes URI requests by substituting special characters in the path with percent-encoded equivalents and substituting spaces with "+"
and "+"
with the percent-encoded equivalent in the URI query component.
url | a URL string to encode |
The URI string is divided into three parts:
"?"
or "#"
character"?"
character terminating the path and up to a possible "#"
character"#"
characterFor all parts, any non-ASCII characters and the "%"
character are subjected to percent encoding (RFC 3986 2.1). The path component is identified and distinguished by a "?"
or a "#"
character. Any spaces in the path component are also subjected to percent encoding. The query component is any part of the URI string following a "?"
character up to the end of the URI string or until a "#"
characer is found. Spaces in the query component are encoded with "+"
for compatibility with AJAX libraries, and "+"
signs are subjected to percent encoding. The fragment component is identified as any text following a "#"
character, and this is encoded with the same rules as in the path component.
"+"
in the query component of the URI stringEncodes URLs by substituting '%'
characters with '%25'
, spaces ('
') with '%20'
, and non-ascii characters by percent-encoded representations.
url | a URL string to encode |
encode_all | if True, then in addition to '%' , spaces (' '), and non-ascii characters the following reserved characters (according to RFC 3986 are also encoded: '!' , '*' , '\'' , ' (', ' )', ' ;', ' :', '@' , '&' , '=' , '+' , '$' , ' ,', '/' , ' ?', '#' , ' [', ' ]' |
bool Qore::exists | ( | ... | ) |
A function performing the same role as the exists operator.
... | if only a single argument is passed, then this function returns True if the single argument exists, False if not; otherwise is multiple arguments are passed to the function, it always returns True; this is to emulate the behavior of the exists operator |
bool Qore::exists_function | ( | code | c | ) |
Always returns True.
This function variant is included for backwards-compatibility
c | a call reference or closure: |
Returns True if the function exists in the current program's function name space.
name | the name of the function to check |
nothing Qore::existsFunction | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
bool Qore::existsFunction | ( | code | c | ) |
Always returns True.
This function variant is included for backwards-compatibility
c | a call reference or closure: |
Returns True if the function exists in the current program's function name space.
name | the name of the function to check |
Returns "builtin"
(for a builtin function), "user"
(for a user function), or NOTHING (if the function cannot be found) according to the function name passed.
name | The function name to check |
"builtin"
(for a builtin function), "user"
(for a user function), or NOTHING (if the function cannot be found) according to the function name passednothing Qore::functionType | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns "builtin"
(for a builtin function), "user"
(for a user function), or NOTHING (if the function cannot be found) according to the function name passed.
name | The function name to check |
"builtin"
(for a builtin function), "user"
(for a user function), or NOTHING (if the function cannot be found) according to the function name passedReturns the byte value at the given byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
b | the data to process |
offset | the byte offset of the data to retrieve (the first value is at offset 0) |
Returns the byte value at the given byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
str | the string data to process |
offset | the byte offset of the data to retrieve (the first value is at offset 0) |
code Qore::get_call_reference | ( | string | identifier | ) |
resolve the string as a call reference
identifier | the string to resolve; function or static class method, can include namespace path |
CALL-REFERENCE-ERROR
exception is thrownCALL-REFERENCE-ERROR | cannot resolve call reference; method not accessible in the calling context |
Returns the class name of the object passed.
obj | the object to get the class name of |
string Qore::get_default_encoding | ( | ) |
Returns the name of the default character encoding.
returns a descriptive string for an exception location; the source
and offset
information will also be included in the string returned if present in the ExceptionInfo hash argument
ex | a hash which should be an ExceptionInfo hash |
"sftp-poller.q:140"
)Returns a list of strings of the builtin and module-supplied features of Qore.
returns a hash of global variables
retrieves a hash of local variables for the given stack frame
frame | the stack frame where 0 is the current stack frame |
"type"
: can be either "local" or "closure" for closure-bound local variables"value"
: the value of the variableCIRCULAR-REFERENCE-ERROR | circular reference found when retrieving local variable values |
Returns a hash of hashes describing the currently-loaded Qore modules; the top-level hash keys are the module names.
filename:
the path to the modulename:
the name of the moduledesc:
the description of the moduleversion:
the version of the moduleauthor:
the author of the moduleapi_major:
the major number of the Qore module API version the module supportapi_minor:
the minor number of the Qore module API version the module supporturl:
the module's URLlicense:
the module's licenseReturns a list of hashes describing the currently-loaded Qore modules.
filename:
the path to the modulename:
the name of the moduledesc:
the description of the moduleversion:
the version of the moduleauthor:
the author of the moduleapi_major:
the major number of the Qore module API version the module supportapi_minor:
the minor number of the Qore module API version the module supporturl:
the module's URLlicense:
the module's licensereturns the given global module option
module | the name of the module |
option | the name of the option |
int Qore::get_parse_options | ( | ) |
returns the current parse options for the current Program object
Returns a hash of library build and version info.
PlatformOS:
The operating system used to build the Qore libraryPlatformCPU:
The CPU used as a target for the Qore library buildVersionString:
The full version string for this version of the Qore libraryVersionMajor:
An integer giving the Qore library's major version numberVersionMinor:
An integer giving the Qore library's minor version numberVersionSub:
An integer giving the Qore library's release version numberBuild:
An integer giving the Qore library's subversion revision numberBuildHost:
A string giving information about the host used to compile the Qore libraryCompiler:
The compiler used to build the Qore libraryModuleDir:
The module directory assumed by default in the Qore libraryCFLAGS:
The compiler flags used to compile the Qore libraryLDFLAGS:
The linker flags used to link the Qore libraryReturns a hash of hashes giving information about Qore library options for the current build.
option:
The string description of the optionconstant:
A string giving the name of the constant that has the boolean value for this option (equal to the hash key name)type:
The type of optionvalue:
The boolean value of the optionReturns a list of hashes giving information about Qore library options for the current build.
option:
The string description of the optionconstant:
A string giving the name of the constant that has the boolean value for this optiontype:
The type of optionvalue:
The boolean value of the optionReturns the URL string passed without any password information.
url | the URL to process |
Returns the name of the directory from which the current script was executed or NOTHING if unknown (i.e. no parent script, script read from stdin, etc)
Returns the path (directory and filename) of the current script or NOTHING if unknown (i.e. no parent script, script read from stdin, etc)
Returns the 16-bit integer value at the given 2-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes MSB byte order when retrieving the value from the data
b | the data to process |
offset | the 2-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 16-bit integer value at the given 2-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes MSB byte order when retrieving the value from the data
str | the string data to process |
offset | the 2-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 16-bit integer value at the given 2-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes LSB byte order when retrieving the value from the data
b | the data to process |
offset | the 2-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 16-bit integer value at the given 2-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes LSB byte order when retrieving the value from the data
str | the string data to process |
offset | the 2-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes MSB byte order when retrieving the value from the data
b | the data to process |
offset | the 4-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes MSB byte order when retrieving the value from the data
str | the string data to process |
offset | the 4-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes LSB byte order when retrieving the value from the data
b | the data to process |
offset | the 4-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes LSB byte order when retrieving the value from the data
str | the string data to process |
offset | the 4-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 64-bit integer value at the given 8-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes MSB byte order when retrieving the value from the data
b | the data to process |
offset | the 8-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 64-bit integer value at the given 8-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes MSB byte order when retrieving the value from the data
str | the string data to process |
offset | the 8-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 64-bit integer value at the given 8-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes LSB byte order when retrieving the value from the data
b | the data to process |
offset | the 8-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 64-bit integer value at the given 8-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes LSB byte order when retrieving the value from the data
str | the string data to process |
offset | the 8-byte offset of the data to retrieve (the first value is at offset 0) |
nothing Qore::getByte | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns the byte value at the given byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
b | the data to process |
offset | the byte offset of the data to retrieve (the first value is at offset 0) |
Returns the byte value at the given byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
str | the string data to process |
offset | the byte offset of the data to retrieve (the first value is at offset 0) |
nothing Qore::getClassName | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns the class name of the object passed.
obj | the object to get the class name of |
Returns a list of strings of the builtin and module-supplied features of Qore.
Returns a hash of hashes describing the currently-loaded Qore modules; the top-level hash keys are the module names.
filename:
the path to the modulename:
the name of the moduledesc:
the description of the moduleversion:
the version of the moduleauthor:
the author of the moduleapi_major:
the major number of the Qore module API version the module supportapi_minor:
the minor number of the Qore module API version the module supporturl:
the module's URLlicense:
the module's licenseReturns a list of hashes describing the currently-loaded Qore modules.
filename:
the path to the modulename:
the name of the moduledesc:
the description of the moduleversion:
the version of the moduleauthor:
the author of the moduleapi_major:
the major number of the Qore module API version the module supportapi_minor:
the minor number of the Qore module API version the module supporturl:
the module's URLlicense:
the module's licensenothing Qore::getWord32 | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes MSB byte order when retrieving the value from the data
b | the data to process |
offset | the 4-byte offset of the data to retrieve (the first value is at offset 0) |
Returns the 32-bit integer value at the given 4-byte offset (the first value is at offset 0) or NOTHING if the offset is not legal for the given data.
This function assumes MSB byte order when retrieving the value from the data
str | the string data to process |
offset | the 4-byte offset of the data to retrieve (the first value is at offset 0) |
Returns True if the given key exists in the hash (does not necessarily have to have a value assigned); exceptions are only raised if string encoding errors are encountered.
h | the hash to check |
key | the key name to check; this value will be converted to the default character encoding to check the hash |
ENCODING-CONVERSION-ERROR | this error is thrown if the given key cannot be converted to the default character encoding |
Returns True if the given key exists in the object (does not necessarily have to have a value assigned); exceptions are only raised if string encoding errors are encountered or in case of object access errors.
ENCODING-CONVERSION-ERROR | this error is thrown if the given key cannot be converted to the default character encoding |
nothing Qore::hash_values | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns a list of all the values in the hash argument passed.
h | a hash to get all the values of |
nothing Qore::hextoint | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns an integer for a hexadecimal string value; throws an exception if non-hex digits are found.
str | a string of hexadecimal digits (like "6d4f84e0" ; with or without leading "x" or "0x" ) |
PARSE-HEX-ERROR | invalid hex digit found |
nothing Qore::html_decode | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns a string with any HTML escape codes translated to the original characters.
str | the argument to decode |
nothing Qore::html_encode | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns a string with characters needing HTML escaping translated to HTML escape codes.
str | the argument to process |
nothing Qore::load_module | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
nothing Qore::load_module | ( | string | name, |
int | warning_mask = WARN_MODULES |
||
) |
Loads in a Qore module at run-time.
If a feature with the same name already exists, then this feature's code is imported into the current Program object if necessary and no further action is taken.
Note that modules providing objects resolved at parse time (classes, constants, functions, etc) must be loaded with the %requires directive instead, unless all references to the objects provided by the module will be made in code embedded in child Program objects.
name | either a feature name (a module will be searched with this feature name) or a path to a module to load |
warning_mask | the warning mask to use when loading the module; note that warnings are treated as errors |
LOAD-MODULE-ERROR | module cannot be loaded: API incompatibility, module defines symbols already defined in the target object, etc |
warning_mask
parameter __7_ hash< ExceptionInfo > Qore::load_module_warn | ( | string | name, |
int | warning_mask = WARN_MODULES |
||
) |
Loads in a Qore module at run-time.
If a feature with the same name already exists, then this feature's code is imported into the current Program object if necessary and no further action is taken.
Note that modules providing objects resolved at parse time (classes, constants, functions, etc) must be loaded with the %requires directive instead, unless all references to the objects provided by the module will be made in code embedded in child Program objects.
name | either a feature name (a module will be searched with this feature name) or a path to a module to load |
warning_mask | the warning mask to use when loading the module; note that warnings are treated as errors |
LOAD-MODULE-ERROR | module cannot be loaded: API incompatibility, module defines symbols already defined in the target object, etc |
warning_mask
parameter nothing Qore::load_user_module_with_program | ( | string | name, |
Qore::Program | pgm | ||
) |
Loads in a Qore user module at run-time with using the given Program object as the container for the user module code.
This function allows a user module to be loaded with a custom API already present in the user module's Program container
name | the name or path of the user module to load |
pgm | the Program object to use as a container for the new user module, presumably this has a custom API that the user module can use; note that after this call the Program object will be owned by the user module, therefore the object itself will no longer be valid and any accesses to the object after this call will result in an exception |
LOAD-MODULE-ERROR | module cannot be loaded: binary modules cannot be loaded in Program containers, module defines symbols already defined in the target object, etc |
Returns a base64-encoded representation of a binary object.
Implementation based on RFC-1421 and RFC-2045
bin | the data to encode |
maxlinelen | the maximum length of a line in the resulting output string in bytes; if this value is > 0 then output lines will be separated by CRLF characters |
Returns a base64-encoded representation of a string.
Implementation based on RFC-1421 and RFC-2045
str | the string to encode |
maxlinelen | the maximum length of a line in the resulting output string in bytes; if this value is > 0 then output lines will be separated by CRLF characters |
Returns a base64-url-encoded representation of a binary object.
Just like make_base64_string() but with "+"
and "/"
subject to URL percent encoding
bin | the data to encode |
Returns a base64-url-encoded representation of a string.
Just like make_base64_string() but with "+"
and "/"
subject to URL percent encoding
str | the string to encode |
Returns a hex-encoded representation of a binary object.
bin | the binary object to encode |
Returns a hex-encoded representation of a string.
str | the string to encode |
nothing Qore::makeBase64String | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns a base64-encoded representation of a binary object.
Implementation based on RFC-1421 and RFC-2045
bin | the data to encode |
maxlinelen | the maximum length of a line in the resulting output string in bytes; if this value is > 0 then output lines will be separated by CRLF characters |
Returns a base64-encoded representation of a string.
Implementation based on RFC-1421 and RFC-2045
str | the string to encode |
maxlinelen | the maximum length of a line in the resulting output string in bytes; if this value is > 0 then output lines will be separated by CRLF characters |
nothing Qore::makeHexString | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns a hex-encoded representation of a binary object.
bin | the binary object to encode |
Returns a hex-encoded representation of a string.
str | the string to encode |
nothing Qore::parse | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
__7_ hash< auto > Qore::parse | ( | string | code, |
string | label, | ||
__7_ softint | warning_mask, | ||
__7_ string | source, | ||
__7_ softint | offset, | ||
softbool | format_label = True |
||
) |
Adds the text passed to the current program's code, tagged with the given label.
code | the string of Qore source code to parse; the parsed code will be added to the current program |
label | a label identifying the code or the code's source |
warning_mask | An optional warning mask; see Warning Constants for values to combine by binary-or; if this arguments is 0 or not given then no warnings will be checked or issued and the return value will always be NOTHING |
source | An optional source file name for the code being parsed; this is useful if sections of a file are parsed |
offset | An optional line offset for use with the source parameter; this gives the line offset in the file to the code being parsed |
format_label | Qore 0.9 is obsolete / ignored |
Parses a base64 encoded string and returns a binary object of the decoded data.
Implementation based on RFC-1421 and RFC-2045
str | the base64-encoded input data to decode |
BASE64-PARSE-ERROR | A syntax error occurred parsing the base64 string (invalid character, etc) |
Parses a base64 encoded string and returns a string of the decoded data.
Implementation based on RFC-1421 and RFC-2045
str | the base64-encoded input data to decode |
encoding | the character encoding tag for the string return value; if not present, the default character encoding is assumed. |
BASE64-PARSE-ERROR | A syntax error occurred parsing the base64 string (invalid character, etc) |
Parses a base64-url-encoded string and returns a binary object of the decoded data.
Base64-URL encoding is defined by RFC-4648
str | the base64-url-encoded input data to decode |
BASE64-PARSE-ERROR | A syntax error occurred parsing the base64 string (invalid character, etc) |
Parses a base64-url-encoded string and returns a string of the decoded data.
Base64-URL encoding is defined by RFC-4648
str | the base64-url-encoded input data to decode |
encoding | the character encoding tag for the string return value; if not present, the default character encoding is assumed. |
BASE64-PARSE-ERROR | A syntax error occurred parsing the base64 string (invalid character, etc) |
Parses a hex-encoded string and returns the binary object.
hexstr | a string of an even-number of only hexadecimal digits |
PARSE-HEX-ERROR | A syntax error occurred parsing the hex string (odd number of digits, invalid hex character, etc) |
Parses a URL string and returns a hash of the components.
Throws an exception if the string cannot be parsed as a URL
url | the URL to parse (ex: "https://user:pass@host:8080/path" ); either a hostname or path is required at a minimum or a PARSE-URL-ERROR exception is raised |
options | a bitfield of URL Parsing Options |
"host"
or the "path"
keys will always be returned if no PARSE-URL-ERROR
is raised):protocol:
the scheme in the URL (ex: "http"
)path:
any path given in the URL; the path will be prefixed by "/"
if a hostname is found in the URL argument string, otherwise it will not if it was not given as such in the argument string; subject to percent decoding if QURL_DECODE passed in options username:
any username given in the URL; subject to percent decoding if QURL_DECODE or QURL_DECODE_PATH passed in options password:
any password given in the URL; subject to percent decoding if QURL_DECODE or QURL_DECODE_PATH passed in options host:
any hostname given in the URL; note that this key will be given if no other information can be found in the URL argument and the URL argument string has no "/"
characters; depending on the usage context for this function, this may actually be a filename; subject to percent decoding if QURL_DECODE or QURL_DECODE_PATH passed in options port:
any port number given in the URLPARSE-URL-ERROR | The URL string given could not be parsed |
scheme://socket=
url_encoded_path/path
, where url_encoded_path is a path with URL-encoding as performed by encode_url(string, True); for example: "http://socket=%2ftmp%socket-dir%2fsocket-file-1/url/path"
; this allows a filesystem path to be used in the host portion of the URL and for the URL to include a URL path as well.Parses a URL string and returns a hash of the components.
Throws an exception if the string cannot be parsed as a URL; does not perform percent decoding
url | the URL to parse (ex: "https://user:pass@host:8080/path" ); either a hostname or path is required at a minimum or a PARSE-URL-ERROR exception is raised |
keep_brackets | if this argument is true then if the hostname or address is enclosed in square brackets, then the brackets will be included in the "host" key output as well; square brackets are used by some Qore methods to denote IPv6 addresses; for example see Socket::connect() |
"host"
or the "path"
keys will always be returned if no PARSE-URL-ERROR
is raised):protocol:
the scheme in the URL (ex: "http"
)path:
any path given in the URL; the path will be prefixed by "/"
if a hostname is found in the URL argument string, otherwise it will not if it was not given as such in the argument string - not subjected to percent decoding (see note below)username:
any username given in the URL - not subjected to percent decoding (see note below)password:
any password given in the URL - not subjected to percent decoding (see note below)host:
any hostname given in the URL; note that this key will be given if no other information can be found in the URL argument and the URL argument string has no "/"
characters; depending on the usage context for this function, this may actually be a filenameport:
any port number given in the URLPARSE-URL-ERROR | The URL string given could not be parsed |
scheme://socket=
url_encoded_path/path
, where url_encoded_path is a path with URL-encoding as performed by encode_url(string, True); for example: "http://socket=%2ftmp%socket-dir%2fsocket-file-1/url/path"
; this allows a filesystem path to be used in the host portion of the URL and for the URL to include a URL path as well.nothing Qore::parseBase64String | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Parses a base64 encoded string and returns a binary object of the decoded data.
Implementation based on RFC-1421 and RFC-2045
str | the base64-encoded input data to decode |
BASE64-PARSE-ERROR | A syntax error occurred parsing the base64 string (invalid character, etc) |
nothing Qore::parseBase64StringToString | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Parses a base64 encoded string and returns a string of the decoded data.
Implementation based on RFC-1421 and RFC-2045
str | the base64-encoded input data to decode |
encoding | the character encoding tag for the string return value; if not present, the default character encoding is assumed. |
BASE64-PARSE-ERROR | A syntax error occurred parsing the base64 string (invalid character, etc) |
nothing Qore::parseHexString | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Parses a hex-encoded string and returns the binary object.
hexstr | a string of an even-number of only hexadecimal digits |
PARSE-HEX-ERROR | A syntax error occurred parsing the hex string (odd number of digits, invalid hex character, etc) |
nothing Qore::parseURL | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Parses a URL string and returns a hash of the components; if the URL cannot be parsed then NOTHING is returned.
url | the URL to parse (ex: "https://user:pass@host:8080/path" ); either a hostname or path is required at a minimum or the function will return NOTHING |
keep_brackets | if this argument is true then if the hostname or address is enclosed in square brackets, then the brackets will be included in the "host" key output as well; square brackets are used by some Qore methods to denote IPv6 addresses; for example see Socket::connect() |
"host"
or the "path"
keys will always be returned if a hash is returned):protocol:
the scheme in the URL (ex: "http"
)path:
any path given in the URL; the path will be prefixed by "/"
if a hostname is found in the URL argument string, otherwise it will not if it was not given as such in the argument string - not subjected to percent decoding (see note below)username:
any username given in the URL - not subjected to percent decoding (see note below)password:
any password given in the URL - not subjected to percent decoding (see note below)host:
any hostname given in the URL; note that this key will be given if no other information can be found in the URL argument and the URL argument string has no "/"
characters; depending on the usage context for this function, this may actually be a filename - not subjected to percent decoding (see note below)port:
any port number given in the URLscheme://socket=
url_encoded_path/path
, where url_encoded_path is a path with URL-encoding as performed by encode_url(string, True); for example: "http://socket=%2ftmp%socket-dir%2fsocket-file-1/url/path"
; this allows a filesystem path to be used in the host portion of the URL and for the URL to include a URL path as well.Reloads an already-loaded Qore module subject to code injection at run-time into Qore; the module's code is not imported into the current Program object.
name | a feature name for an already-loaded module |
LOAD-MODULE-ERROR | module cannot be loaded: API incompatibility, etc |
set the value of a global variable
name | the name of the variable |
value | the value to assign |
UNKNOWN-VARIABLE | the variable is not a global variable |
sets the value of the given local variable; if the variable cannot be found an exception is raised
frame | the stack frame where 0 is the current or highest stack frame |
var | the name of the local variable |
value | the value to assign |
UNKNOWN-VARIABLE | the given local variable is not present in the current stack frame |
set the given module option
module | the name of the module |
option | the name of the option |
value | the value to assign; setting to NOTHING removes the module option |
Qore::set_return_value | ( | auto | val | ) |
sets the return value for a Program object when running with %exec-class
val | the return value for the Program |
SETRETURNVALUE-ERROR | this exception is thrown if the Program is not currently running in %exec-class mode |
nothing Qore::splice | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
Returns a list based on the argument list but with elements removed from the given index to the end of the list.
Exceptions can only be thrown here if objects are removed from the list and this causes them to go out of scope and an exception is thrown in one of the destructors
l | the list to process |
start | the starting element (where the first element is 0) to start removing elements; if this value is negative, it gives the offset from the end of the list |
Returns a list based on the argument list but optionally with elements removed and/or added from a certain index.
Exceptions can only be thrown here if objects are removed from the list and this causes them to go out of scope and an exception is thrown in one of the destructors
l | the list to process |
start | the starting element (where the first element is 0) to start removing (and/or adding) elements; if this value is negative, it gives the offset from the end of the list |
len | the number of list elements to remove; if this argument is 0 then no elements are removed; if this value is negative, then it gives an offset from the end of the list (ie -2 means remove all elements up to but not including the two last elements) |
Returns a list based on the argument list but optionally with elements removed and/or added from a certain index.
Exceptions can only be thrown here if objects are removed from the list and this causes them to go out of scope and an exception is thrown in one of the destructors
l | the list to process |
start | the starting element (where the first element is 0) to start removing (and/or adding) elements; if this value is negative, it gives the offset from the end of the list |
len | the number of list elements to remove; if this argument is 0 then no elements are removed; if this value is negative, then it gives an offset from the end of the list (ie -2 means remove all elements up to but not including the two last elements) |
nlist | the new list for inserting new elements |
This function always returns an empty string ""
.
This function variant is included for backwards-compatibility
str | no action is taken on the argument |
""
Returns a string based on the argument string but with characters removed from a certain character index.
An exception can only be thrown here if an invalid multi-byte encoding is found
str | the string to process |
start | the character index (where the first character is 0) to start removing characters; if this value is negative, it gives the offset from the end of the string |
Returns a string based on the argument string but optionally with characters removed and/or added from a certain character index.
An exception can only be thrown here if an invalid multi-byte encoding is found
str | the string to process |
start | the character index (where the first character is 0) to start removing (and/or adding) characters; if this value is negative, it gives the offset from the end of the string |
len | the number of characters to remove; if this argument is 0 then no characters are removed; if this value is negative, then it gives an offset from the end of the string (ie -2 means remove all characters up to but not including the two last characters) |
nstr | the optional string for inserting new characters |
nothing Qore::strtoint | ( | ) |
This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.
parses a string representing a number in a configurable base and returns the integer
num | a string representing a number |
base | the base of the number |
STRTOINT-ERROR | cannot parse string; unsupported base, etc |