Qore Programming Language Reference Manual 2.0.0
Loading...
Searching...
No Matches
ql_string.dox.h
1
3namespace Qore {
192
194
221int bindex(softstring str, softstring substr, softint pos = 0);
222
224
228int bindex();
229
231
258int brindex(softstring str, softstring substr, softint pos = -1);
259
261
266
268
291int char_width(softstring str);
292
294
310string chomp(string str);
311
313
324*string chomp(reference<string> str);
325
327
331nothing chomp();
332
334
349string chr(softint val, *string encoding);
350
352
357string chr(auto arg);
358
360
364nothing chr();
365
367
382string convert_encoding(string str, string encoding);
383
385
390
392
411string f_printf(string fmt, ...);
412
414
418string f_printf();
419
421
440string f_sprintf(string fmt, ...);
441
443
447string f_sprintf();
448
450
471string f_vprintf(string fmt, auto varg);
472
474
495string f_vsprintf(string fmt, auto varg);
496
498
506nothing flush();
507
509
524string force_encoding(string str, string encoding);
525
527
532
534
559string format_number(string fmt, softfloat num);
560
562
567
569
583string get_encoding(string str);
584
586
590nothing get_encoding();
591
593
622int index(softstring str, softstring substr, softint pos = 0);
623
625
629int index();
630
632
647string join(string str, ...);
648
650
667string join(string str, list<auto> l);
668
670
674nothing join();
675
677
700int length(softstring str);
701
703
717int length(binary bin);
718
720
724nothing length();
725
727
731int length(auto arg);
732
734
750string ltrim(string str, *string chars);
751
753
767*string ltrim(reference<string> str, *string chars);
768
770
785int ord(softstring str, softint offset = 0);
786
788
792int ord();
793
795
809bool parse_boolean(string str);
810
812
824bool parse_boolean(any val);
825
827
846float parse_float(string str, string fmt);
847
849
868int parse_int(string str, string fmt);
869
871
890number parse_number(string str, string fmt);
891
893
905nothing print( ...);
906
908
927string printf(string fmt, ...);
928
930
937string printf();
938
940
964bool regex(string str, string regex, int options = 0);
965
967
971nothing regex();
972
974
1000*list<*string> regex_extract(string str, string regex, int options = 0);
1001
1003
1008
1010
1049string regex_subst(string str, string regex, string subst, int options = 0);
1050
1052
1056nothing regex_subst();
1057
1059
1087string replace(string str, string source, string target, int start = 0, int end = -1);
1088
1090
1094nothing replace();
1095
1097
1113string reverse(softstring str);
1114
1116
1145int rindex(softstring str, softstring substr, softint pos = -1);
1146
1148
1152int rindex();
1153
1155
1173string rtrim(string str, *string chars);
1174
1176
1192*string rtrim(reference<string> str, *string chars);
1193
1195
1219list<string> split(string sep, string str, bool with_separator = False);
1220
1222
1257list<string> split(string sep, string str, string quote, bool trim_unquoted = False);
1258
1260
1275list<binary> split(data sep, binary data);
1276
1278
1283
1285
1304string sprintf(string fmt, ...);
1305
1307
1311string sprintf();
1312
1314
1334int strlen(softstring str);
1335
1337
1341nothing strlen();
1342
1344
1348int strlen(auto arg);
1349
1351
1365string strmul(softstring str, softint smul, *softint offset);
1366
1368
1388string substr(softstring str, softint start);
1389
1391
1412string substr(softstring str, softint start, softint len);
1413
1415
1435binary substr(binary b, softint start);
1436
1438
1459binary substr(binary b, softint start, softint len);
1460
1462
1466nothing substr();
1467
1469
1493string tolower(string str);
1494
1496
1500nothing tolower();
1501
1503
1527string toupper(string str);
1528
1530
1534nothing toupper();
1535
1537
1552string trim(string str, *string chars);
1553
1555
1569*string trim(reference<string> str, *string chars);
1570
1572
1576nothing trim();
1577
1579
1595string trunc_str(softstring str, softint len, *string encoding);
1596
1598
1617string vprintf(string fmt, auto varg);
1618
1620
1624string vprintf();
1625
1627
1646string vsprintf(string fmt, auto varg);
1647
1649
1653string vsprintf();
1654
1656}
1657
1659namespace Qore {
1665
1667 const RE_Caseless = PCRE2_CASELESS;
1669 const RE_DotAll = PCRE2_DOTALL;
1671 const RE_Extended = PCRE2_EXTENDED;
1673 const RE_Global = QRE_GLOBAL;
1675 const RE_MultiLine = PCRE2_MULTILINE;
1677
1679 const RE_Unicode = PCRE2_UCP;
1681}
const False
logical False
Definition qc_qore.dox.h:96
nothing reverse()
This function variant does nothing at all.
const RE_DotAll
makes a dot (.) match a newline character, equivalent to /s
Definition ql_string.dox.h:1669
const RE_Unicode
extends Posix matches to the full Unicode character set
Definition ql_string.dox.h:1679
const RE_Extended
ignores whitespace characters and enables comments prefixed by #, equivalent to /x
Definition ql_string.dox.h:1671
const RE_Caseless
Ignores case when matching regular expressions, equivalent to /i
Definition ql_string.dox.h:1667
const RE_MultiLine
makes start-of-line (^) or end-of-line ($) match after or before any newline in the subject string,...
Definition ql_string.dox.h:1675
const RE_Global
replace all matches globally in the string or extract all occurrences of the pattern(s) in the string...
Definition ql_string.dox.h:1673
number parse_number(string str, string fmt)
returns a number corresponding to the string and the argument, giving the format
nothing replace()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
string f_vprintf(string fmt, auto varg)
Outputs the string passed to standard output, using the first argument as a format string and a secon...
string rtrim(string str, *string chars)
Removes byte characters from the end of a string and returns the new string.
string vprintf()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing chomp()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing regex_extract()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
int rindex()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing strlen()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
int char_width(softstring str)
Returns the width of characters in the string; some unicode characters take up multiple spaces on out...
nothing length()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
string trunc_str(softstring str, softint len, *string encoding)
Returns a truncated string with no more than the given number of bytes and optionally converted to a ...
string f_vsprintf(string fmt, auto varg)
Returns a formatted string based on a format string and other arguments given as a list after the for...
string f_sprintf()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing flush()
Flushes output to the console output with print(), printf(), etc.
nothing chr()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing substr()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
string f_printf()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
bool parse_boolean(string str)
tries to parse a string value as a boolean
nothing get_encoding()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing toupper()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing join()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing print(...)
Outputs a string to standard output with no formatting.
nothing format_number()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
int brindex()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
string ltrim(string str, *string chars)
Removes byte characters from the start of a string and returns the new string.
string strmul(softstring str, softint smul, *softint offset)
Returns a new string with a repeated string element and optionally removing trailing characters.
string sprintf()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
int bindex()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing force_encoding()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing regex_subst()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing convert_encoding()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing regex()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
int index()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
string vsprintf()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
int ord()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
list< string > split()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
int parse_int(string str, string fmt)
returns an integer corresponding to a string representing the number and an argument giving the forma...
float parse_float(string str, string fmt)
returns a floating-point value corresponding to a string representing the number and an argument givi...
nothing tolower()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
string printf()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing trim()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
number number()
Always returns 0.0.
list< auto > list(...)
Returns a list of the arguments passed at the top level.
binary binary()
Always returns an empty binary object (of zero length)
main Qore-language namespace
Definition Pseudo_QC_All.dox.h:3