Qore Programming Language Reference Manual  0.8.8
 All Classes Namespaces Functions Variables Groups Pages
Pseudo_QC_String.dox.h
1 namespace Qore {
4 
5 class <string> : public <value> {
6 
7 public:
9 
23 int comparePartial(string ostr);
24 
25 public:
27 
39 bool empty();
40 
41 public:
43 
55 string encoding();
56 
57 public:
59 
75 bool equalPartial(string ostr);
76 
77 public:
79 
93 bool equalPartialPath(string ostr);
94 
95 public:
97 
125 int find(softstring substr, softint pos = 0);
126 
127 public:
129 
143 int getUnicode(int offset = 0);
144 
145 public:
147 
158 bool intp();
159 
160 public:
162 
174 bool isDataAscii();
175 
176 public:
178 
190 bool isDataPrintableAscii();
191 
192 public:
194 
212 int length();
213 
214 public:
216 
239 string lwr();
240 
241 public:
243 
268 bool regex(string regex, int options = 0);
269 
270 public:
272 
300 *list regexExtract(string regex, int options = 0);
301 
302 public:
304 
332 int rfind(softstring substr, softint pos = -1);
333 
334 public:
336 
352 int size();
353 
354 public:
356 
376 list split(string sep, bool with_separator = False);
377 
378 public:
380 
407 list split(string sep, string quote, bool trim_unquoted = False);
408 
409 public:
411 
427 int strlen();
428 
429 public:
431 
442 bool strp();
443 
444 public:
446 
465 string substr(softint start);
466 
467 public:
469 
491 string substr(softint start, softint len);
492 
493 public:
495 
515 string toBase64(softint maxlinelen = -1);
516 
517 public:
519 
535 string toHex();
536 
537 public:
539 
563 string toMD5();
564 
565 public:
567 
589 string toSHA1();
590 
591 public:
593 
618 string toSHA224();
619 
620 public:
622 
647 string toSHA256();
648 
649 public:
651 
676 string toSHA384();
677 
678 public:
680 
705 string toSHA512();
706 
707 public:
709 
723 int typeCode();
724 
725 public:
727 
742 string unaccent();
743 
744 public:
746 
769 string upr();
770 
771 public:
773 
787 bool val();
788 };
789 };
string substr(softint start)
Returns a portion of a string starting from an integer offset.
string toSHA224()
Returns the SHA-224 message digest (a variant of SHA-2) of the string as a hex string.
string toBase64(softint maxlinelen=-1)
Returns the base64-encoded representation of the string.
int comparePartial(string ostr)
Compares the beginning of the current string with a shorter string passed as an argument, returns -1, 0, or 1 if the argument string is less than, equal, or greater than the beginning of the current string; returns also -1 if the argument string is equal to the beginning of the current string but the argument string is longer than the current string.
string toSHA1()
Returns the SHA1 message digest of the string as a hex string.
int find(softstring substr, softint pos=0)
Retrieves the character position of a substring within a string.
bool isDataAscii()
returns True if the string is empty or has no characters with the high bit set (ie all characters &lt; 1...
string encoding()
Returns the name of the string&#39;s character encoding.
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:5
bool equalPartial(string ostr)
Compares the beginning of the current string with a shorter string passed as an argument for equality...
Methods in this pseudo-class can be executed on strings.
Definition: Pseudo_QC_String.dox.h:5
bool empty()
Returns True if the string is empty, False if not.
string toSHA384()
Returns the SHA-384 message digest (a variant of SHA-2) of the string as a hex string.
bool isDataPrintableAscii()
returns True if the string is empty or only contains printable non-control ASCII characters (ie all c...
bool strp()
Returns True by default.
bool equalPartialPath(string ostr)
Compares the beginning of the current string assumed to be a path with a shorter string passed as an ...
const False
logical False
Definition: qc_qore.dox.h:92
string lwr()
Returns the string in lower case.
list list(...)
Returns a list of the arguments passed at the top level.
string unaccent()
Returns a string with all accented characters removed.
bool intp()
Returns True if the string can be converted to an integer, False if not, this depends on the first (o...
string upr()
Returns the string in upper case.
int strlen()
Returns the number of bytes in the string (not including the terminating null character (&#39;\0&#39;) ...
bool val()
Returns False if the string is empty or has the exact value &quot;0&quot;, True if not (note that if %strict-bo...
bool regex(string regex, int options=0)
Returns True if the regular expression matches the string passed, otherwise returns False...
int length()
Returns the number of characters in the string; may not be equal to the byte length (returned by Qore...
list split(string sep, bool with_separator=False)
Splits a string into a list of components based on a separator string.
string toSHA512()
Returns the SHA-512 message digest (a variant of SHA-2) of the string as a hex string.
string toMD5()
Returns the MD5 message digest of the string as a hex string.
int getUnicode(int offset=0)
returns the Unicode code for the given character offset in the string
int size()
Returns the number of bytes in the string (not including the terminating null character (&#39;\0&#39;) ...
int typeCode()
Returns Qore::NT_STRING.
string toSHA256()
Returns the SHA-256 message digest (a variant of SHA-2) of the string as a hex string.
int rfind(softstring substr, softint pos=-1)
Retrieves the character position of a substring within a string, starting the search from the end of ...
string toHex()
returns a string of hexadecimal digits corresponding to the contents of the string ...
*list regexExtract(string regex, int options=0)
Returns a list of substrings in a string based on matching patterns defined by a regular expression...