| Qore Programming Language Reference Manual 1.0.8

Pseudo_QC_Int.dox.h
1
3 namespace Qore {
5 /***/
6 class <int> : public <value> {
7
8 public:
10
24 int abs();
25
26 public:
28
44 binary encodeLsb(int size = 4);
45
46 public:
48
64 binary encodeMsb(int size = 4);
65
66 public:
68
94 string format(string fmt);
95
96 public:
98
122 string format(int prec = 2, string decimal_sep = ".", string thousands_sep = "");
123
124 public:
126
137 bool intp();
138
139 public:
141
153 int sign();
154
155 public:
157
168 bool strp();
169
170 public:
172
207 string toBase(int base = 10);
208
209 public:
211
225 string toUnicode();
226
227 public:
229
243 int typeCode();
244
245 public:
247
261 bool val();
262 };
263 }
<int>::strp
bool strp()
Returns True because integer values can be converted to strings.
<int>::typeCode
int typeCode()
Returns Qore::NT_INT.
<int>::toBase
string toBase(int base=10)
Converts the integer to a different base (and returns it as a string).
<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
<int>
Methods in this pseudo-class can be executed on integer values.
Definition: Pseudo_QC_Int.dox.h:6
<int>::toUnicode
string toUnicode()
Returns a single character string in UTF-8 encoding for the integer value treated as a unicode value...
Qore::binary
binary binary()
Always returns an empty binary object (of zero length)
<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>::format
string format(string fmt)
Returns a formatted string of the integer according to the format argument.
<int>::sign
int sign()
Returns -1 if the number is negative, 0 if it is zero, or 1 if it is positive.
<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...
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
<int>::val
bool val()
Returns True if the int is non-zero, False if zero.
<int>::intp
bool intp()
Returns True by default.
<int>::abs
int abs()
Returns the absolute value of the number.
<value>::size
int size()
Returns zero; this method will be reimplemented in container types where it may return a non-zero val...