|
binary | Qore::binary () |
| Always returns an empty binary object (of zero length)
|
|
binary | Qore::binary (null x) |
| Always returns an empty binary object (of zero length)
|
|
binary | Qore::binary (softstring str) |
| Returns a binary data type of the string passed; data types other than string will first be converted to a string and then returned as binary data.
|
|
binary | Qore::binary (binary bin) |
| Always returns the same binary object passed.
|
|
string | Qore::binary_to_string (binary b, *string encoding) |
| Returns a string created from the binary data passed, taking an optional second argument giving the string encoding; if no second argument is passed then the default character encoding is assumed.
|
|
bool | Qore::boolean (any arg) |
| Converts the argument to a boolean value.
|
|
float | Qore::float (softfloat f) |
| Converts the argument to a floating-point (float) value.
|
|
float | Qore::float () |
| Always returns 0.0.
|
|
hash | Qore::hash (object obj) |
| Returns a hash of an object's members.
|
|
hash | Qore::hash (list l) |
| Returns a hash by taking even numbered list elements (starting with 0) and converting them to strings for the hash keys, and the odd numbered elements following the keys as the key value.
|
|
hash | Qore::hash (list keys, list values) |
| Returns a hash by taking the first list as a list of keys, and the second list as a list of values.
|
|
hash | Qore::hash (hash h) |
| Returns itself.
|
|
hash | Qore::hash () |
| Always returns the same hash passed.
|
|
int | Qore::int (string str, softint base) |
| Converts the argument to an integer value.
|
|
int | Qore::int (softint i) |
| Converts the argument to an integer value.
|
|
int | Qore::int () |
| Always returns 0.
|
|
list | Qore::list (...) |
| Returns a list of the arguments passed at the top level.
|
|
number | Qore::number (softnumber n) |
| Converts the argument to a number value.
|
|
number | Qore::number () |
| Always returns 0.0.
|
|
string | Qore::string (softstring str) |
| Converts the argument to a string.
|
|
string | Qore::string () |
| Always returns an empty string.
|
|
string | Qore::type (any arg) |
| Returns a string giving the data type of the argument passed; see String Type Constants for the values returned by this function.
|
|
string | Qore::typename (any arg) |
| Returns a string giving the data type of the argument passed; see String Type Constants for the values returned by this function.
|
|
binary Qore::binary |
( |
softstring |
str | ) |
|
Returns a binary data type of the string passed; data types other than string will first be converted to a string and then returned as binary data.
This function is useful if, for example, a string type actually contains binary data; using this function will ensure that all data in the string (even if it contains embedded nulls) is maintained in the binary object (Qore strings must normally be terminated by a single null, so some Qore string operations do not work on binary data with embedded nulls).
- Code Flags:
- CONSTANT
- Example:
-
hash Qore::hash |
( |
list |
keys, |
|
|
list |
values |
|
) |
| |
Returns a hash by taking the first list as a list of keys, and the second list as a list of values.
If the two lists are of unequal sizes, then the keys list takes precedence (if the values list is longer, excess values are ignored, if the keys list is longer, then excess elements are assigned NOTHING)
- Code Flags:
- RET_VALUE_ONLY
- Parameters
-
keys | a list of key values for the hash |
values | a list of values for the hash, corresponding to the elements in keys |
- Returns
- a hash by taking the first list as a list of keys, and the second list as a list of values
- Example:
-