Qore Programming Language Reference Manual  0.8.9
 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 
146 *string getLine(int offset = 0, *string eol, bool trim = True, *reference size);
147 
148 public:
150 
164 int getUnicode(int offset = 0);
165 
166 public:
168 
179 bool intp();
180 
181 public:
183 
195 bool isDataAscii();
196 
197 public:
199 
211 bool isDataPrintableAscii();
212 
213 public:
215 
233 int length();
234 
235 public:
237 
260 string lwr();
261 
262 public:
264 
289 bool regex(string regex, int options = 0);
290 
291 public:
293 
321 *list regexExtract(string regex, int options = 0);
322 
323 public:
325 
353 int rfind(softstring substr, softint pos = -1);
354 
355 public:
357 
375 int size();
376 
377 public:
379 
388 bool sizep();
389 
390 public:
392 
412 list split(string sep, bool with_separator = False);
413 
414 public:
416 
443 list split(string sep, string quote, bool trim_unquoted = False);
444 
445 public:
447 
463 int strlen();
464 
465 public:
467 
478 bool strp();
479 
480 public:
482 
501 string substr(softint start);
502 
503 public:
505 
527 string substr(softint start, softint len);
528 
529 public:
531 
551 string toBase64(softint maxlinelen = -1);
552 
553 public:
555 
571 string toHex();
572 
573 public:
575 
599 string toMD5();
600 
601 public:
603 
625 string toSHA1();
626 
627 public:
629 
654 string toSHA224();
655 
656 public:
658 
683 string toSHA256();
684 
685 public:
687 
712 string toSHA384();
713 
714 public:
716 
741 string toSHA512();
742 
743 public:
745 
759 int typeCode();
760 
761 public:
763 
778 string unaccent();
779 
780 public:
782 
805 string upr();
806 
807 public:
809 
819 bool val();
820 };
821 };
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...
string trim(string str, *string chars)
Removes byte characters from the start and end of a string and returns the new string (also see the t...
const True
logical True
Definition: qc_qore.dox.h:94
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 sizep()
Returns True since strings can return a non-zero size.
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, True if not.
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.
*string getLine(int offset=0, *string eol, bool trim=True, *reference size)
returns a string for the next line in the string buffer starting at the given offset (or at the begin...
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...