Loading...
Searching...
No Matches
Pseudo_QC_Int.dox.h
namespace Qore {
/***/
class <int> : public <value> {
public:
int abs();
public:
binary encodeLsb(int size = 4);
public:
binary encodeMsb(int size = 4);
public:
string format(string fmt);
public:
string format(int prec = 2, string decimal_sep = ".", string thousands_sep = "");
public:
bool intp();
public:
int sign();
public:
bool strp();
public:
string toBase(int base = 10);
public:
string toUnicode();
public:
int typeCode();
public:
bool val();
};
}
<int>
Methods in this pseudo-class can be executed on integer values.
Definition: Pseudo_QC_Int.dox.h:6
<int>::toBase
string toBase(int base=10)
Converts the integer to a different base (and returns it as a string).
<int>::abs
int abs()
Returns the absolute value of the number.
<int>::typeCode
int typeCode()
Returns Qore::NT_INT.
<int>::intp
bool intp()
Returns True by default.
<int>::format
string format(string fmt)
Returns a formatted string of the integer according to the format argument.
<int>::format
string format(int prec=2, string decimal_sep=".", string thousands_sep="")
Returns a formatted string of the integer according to format arguments.
<int>::encodeMsb
binary encodeMsb(int size=4)
returns a binary object with the integer encoded in the given number of bytes in most significant byt...
<int>::encodeLsb
binary encodeLsb(int size=4)
returns a binary object with the integer encoded in the given number of bytes in least significant by...
<int>::sign
int sign()
Returns -1 if the number is negative, 0 if it is zero, or 1 if it is positive.
<int>::strp
bool strp()
Returns True because integer values can be converted to strings.
<int>::toUnicode
string toUnicode()
Returns a single character string in UTF-8 encoding for the integer value treated as a unicode value.
<int>::val
bool val()
Returns True if the int is non-zero, False if zero.
<value>
Methods in this pseudo-class are available to be executed on any value type (even NOTHING); this is t...
Definition: Pseudo_QC_All.dox.h:6
<value>::size
int size()
Returns zero; this method will be reimplemented in container types where it may return a non-zero val...
Qore::binary
binary binary()
Always returns an empty binary object (of zero length)
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3