Qore Programming Language 1.19.5
Loading...
Searching...
No Matches
QoreString.h
1/* -*- mode: c++; indent-tabs-mode: nil -*- */
2/*
3 QoreString.h
4
5 QoreString Class Definition
6
7 Qore Programming Language
8
9 Copyright (C) 2003 - 2023 Qore Technologies, s.r.o.
10
11 Permission is hereby granted, free of charge, to any person obtaining a
12 copy of this software and associated documentation files (the "Software"),
13 to deal in the Software without restriction, including without limitation
14 the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 and/or sell copies of the Software, and to permit persons to whom the
16 Software is furnished to do so, subject to the following conditions:
17
18 The above copyright notice and this permission notice shall be included in
19 all copies or substantial portions of the Software.
20
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 DEALINGS IN THE SOFTWARE.
28
29 Note that the Qore library is released under a choice of three open-source
30 licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
31 information.
32*/
33
34#ifndef _QORE_QORESTRING_H
35
36#define _QORE_QORESTRING_H
37
38#include <cstdarg>
39#include <string>
40
41class DateTime;
42class BinaryNode;
43
45
49#define CE_HTML (1 << 0)
51#define CE_XML (1 << 1)
53#define CE_NONASCII (1 << 2)
55#define CE_XHTML (CE_HTML | CE_XML)
57#define CE_ALL (CE_XHTML | CE_NONASCII)
59
61
65#define CD_HTML (1 << 0)
67#define CD_XML (1 << 1)
69#define CD_NUM_REF (1 << 2)
71#define CD_XHTML (CD_HTML | CD_XML)
73#define CD_ALL (CD_XHTML | CD_NUM_REF)
75
77
81#define QS_RE_GLOBAL (1 << 0)
82#define QS_RE_CASELESS (1 << 1)
83#define QS_RE_DOTALL (1 << 2)
84#define QS_RE_EXTENDED (1 << 3)
85#define QS_RE_MULTILINE (1 << 4)
87
89
94 friend hashdecl qore_string_private;
95
96public:
98 DLLEXPORT QoreString();
99
101 DLLEXPORT QoreString(bool b);
102
104 DLLEXPORT QoreString(const char* str);
105
107 DLLEXPORT QoreString(const char* str, const QoreEncoding* new_qorecharset);
108
110 DLLEXPORT QoreString(const QoreEncoding* new_qorecharset);
111
113 DLLEXPORT QoreString(const char* str, size_t len, const QoreEncoding* new_qorecharset = QCS_DEFAULT);
114
116 DLLEXPORT QoreString(const std::string& str, const QoreEncoding* new_encoding = QCS_DEFAULT);
117
119 DLLEXPORT QoreString(char c);
120
122 DLLEXPORT QoreString(const QoreString& str);
123
125 DLLEXPORT QoreString(const QoreString* str);
126
128 DLLEXPORT QoreString(const QoreString* str, size_t len);
129
131 DLLEXPORT QoreString(int64 i);
132
134 DLLEXPORT QoreString(double f);
135
137 DLLEXPORT QoreString(const DateTime* date);
138
140 DLLEXPORT QoreString(const BinaryNode* bin);
141
143 DLLEXPORT QoreString(const BinaryNode* bin, size_t maxlinelen);
144
146 DLLEXPORT QoreString(char* nbuf, size_t nlen, size_t nallocated, const QoreEncoding* enc);
147
149 DLLEXPORT ~QoreString();
150
152
154 DLLEXPORT size_t length() const;
155
157 DLLEXPORT void set(const char* str, const QoreEncoding* new_qorecharset = QCS_DEFAULT);
158
160
162 DLLEXPORT void set(const char* str, size_t len);
163
165 DLLEXPORT void set(const std::string& str, const QoreEncoding* new_qorecharset = QCS_DEFAULT);
166
168 DLLEXPORT void set(const QoreString* str);
169
171 DLLEXPORT void set(const QoreString& str);
172
174 DLLEXPORT void set(char* nbuf, size_t nlen, size_t nallocated, const QoreEncoding* enc);
175
177 DLLEXPORT void setEncoding(const QoreEncoding* new_encoding);
178
180
190 DLLEXPORT int concatEncode(ExceptionSink* xsink, const QoreString& str, unsigned code = CE_XHTML);
191
193
205 DLLEXPORT int concatDecode(ExceptionSink* xsink, const QoreString& str, unsigned code = CD_ALL);
206
208
211 DLLEXPORT void concatAndHTMLEncode(const char* str);
212
214
217 DLLEXPORT void concatAndHTMLDecode(const QoreString* str);
218
220
223 DLLEXPORT void concatAndHTMLDecode(const char* str, size_t slen);
224
226
229 DLLEXPORT void concatAndHTMLDecode(const char* str);
230
232
234 DLLEXPORT void concatDecodeUrl(const char* url);
235
237 DLLEXPORT int concatDecodeUrl(const QoreString& url, ExceptionSink* xsink);
238
240
244 DLLEXPORT int concatEncodeUrl(ExceptionSink* xsink, const QoreString& url, bool encode_all = false);
245
247
250 DLLEXPORT int concatDecodeUriRequest(const QoreString& url, ExceptionSink* xsink);
251
253
258 DLLEXPORT int concatEncodeUriRequest(ExceptionSink* xsink, const QoreString& url);
259
261 DLLEXPORT void concatEscape(const QoreString* str, char c, char esc_char, ExceptionSink* xsink);
262
264 DLLEXPORT void concatEscape(const char* str, char c, char esc_char = '\\');
265
267
273 DLLEXPORT void concatAndHTMLEncode(const QoreString* str, ExceptionSink* xsink);
274
276 DLLEXPORT void concat(const QoreString* str, ExceptionSink* xsink);
277
279
285 DLLEXPORT int concat(const QoreString& str, qore_offset_t pos, ExceptionSink* xsink);
286
288
295 DLLEXPORT int concat(const QoreString& str, qore_offset_t pos, qore_offset_t len, ExceptionSink* xsink);
296
298
303 DLLEXPORT void concat(const QoreString* str, size_t size, ExceptionSink* xsink);
304
306 DLLEXPORT void concatBase64(const char* buf, size_t size);
307
309 DLLEXPORT void concatBase64(const BinaryNode* bin);
310
312
314 DLLEXPORT void concatBase64(const QoreString* str);
315
317
319 DLLEXPORT void concatBase64(const char* buf, size_t size, size_t maxlinelen);
320
322
324 DLLEXPORT void concatBase64(const BinaryNode* bin, size_t maxlinelen);
325
327
329 DLLEXPORT void concatBase64(const QoreString* str, size_t maxlinelen);
330
332
335 DLLEXPORT void concatBase64Url(const BinaryNode& bin);
336
338
342 DLLEXPORT void concatBase64Url(const QoreString& str);
343
345
349 DLLEXPORT BinaryNode* parseBase64(ExceptionSink* xsink) const;
350
352
357
359
364 DLLEXPORT QoreString* parseBase64ToString(const QoreEncoding* enc, ExceptionSink* xsink) const;
365
367
376 DLLEXPORT BinaryNode* parseBase64Url(ExceptionSink* xsink) const;
377
379
388
390
398 DLLEXPORT QoreString* parseBase64UrlToString(const QoreEncoding* enc, ExceptionSink* xsink) const;
399
401
403 DLLEXPORT void concatHex(const char* buf, size_t size);
404
406 DLLEXPORT void concatHex(const BinaryNode* bin);
407
409 DLLEXPORT void concatHex(const QoreString* str);
410
412
416 DLLEXPORT BinaryNode* parseHex(ExceptionSink* xsink) const;
417
419 DLLEXPORT void concat(const DateTime* d);
420
422 DLLEXPORT void concatISO8601DateTime(const DateTime* d);
423
425 DLLEXPORT void concat(const char* str);
426
428 DLLEXPORT void concat(const std::string& str);
429
431 DLLEXPORT void concat(const char* str, size_t size);
432
434 DLLEXPORT void concat(const char c);
435
437
442 DLLEXPORT int compareSoft(const QoreString* str, ExceptionSink* xsink) const;
443
445
449 DLLEXPORT int compare(const QoreString* str) const;
450
452
456 DLLEXPORT int compare(const char* str) const;
457
459
461 DLLEXPORT bool equal(const QoreString& str) const;
462
464
466 DLLEXPORT bool equal(const char* str) const;
467
469
475 DLLEXPORT bool equalSoft(const QoreString& str, ExceptionSink* xsink) const;
476
478
480 DLLEXPORT bool equalPartial(const QoreString& str) const;
481
483
485 DLLEXPORT bool equalPartial(const char* str) const;
486
488
494 DLLEXPORT bool equalPartialSoft(const QoreString& str, ExceptionSink* xsink) const;
495
497
503 DLLEXPORT bool equalPartialPath(const QoreString& str, ExceptionSink* xsink) const;
504
506
508 DLLEXPORT bool startsWith(const char* str) const;
509
511
513 DLLEXPORT bool startsWith(const std::string& str) const;
514
516
518 DLLEXPORT bool endsWith(const char* str) const;
519
521
523 DLLEXPORT bool endsWith(const std::string& str) const;
524
526 DLLEXPORT void terminate(size_t size);
527
529
531 DLLEXPORT void reserve(size_t size);
532
534
536 DLLEXPORT int sprintf(const char* fmt, ...);
537
539
541 DLLEXPORT int vsprintf(const char* fmt, va_list args);
542
544
546 DLLEXPORT void take(char* str);
547
549 DLLEXPORT void take(char* str, const QoreEncoding* enc);
551
552 DLLEXPORT void take(char* str, size_t size);
553
555 DLLEXPORT void take(char* str, size_t size, const QoreEncoding* enc);
556
558 DLLEXPORT void takeAndTerminate(char* str, size_t size);
559
561 DLLEXPORT void takeAndTerminate(char* str, size_t size, const QoreEncoding* enc);
562
564
569 DLLEXPORT QoreString* convertEncoding(const QoreEncoding* nccs, ExceptionSink* xsink) const;
570
572
575 DLLEXPORT char* giveBuffer();
576
578 DLLEXPORT void clear();
579
581
583 DLLEXPORT void reset();
584
586
588 DLLEXPORT void replaceAll(const char* old_str, const char* new_str);
589
591
593 DLLEXPORT void replace(size_t offset, size_t len, const char* str);
594
596
598 DLLEXPORT void replace(size_t offset, size_t len, const QoreString* str, ExceptionSink* xsink);
599
601
603 DLLEXPORT void replaceChar(size_t offset, char c);
604
606
610 DLLEXPORT void splice(qore_offset_t offset, ExceptionSink* xsink);
611
613
618 DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, ExceptionSink* xsink);
619
621
627 DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, QoreValue strn, ExceptionSink* xsink);
628
630
636 DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, const QoreString& str, ExceptionSink* xsink);
637
639
644 DLLEXPORT QoreString* extract(qore_offset_t offset, ExceptionSink* xsink);
645
647
654
656
664
666
671 DLLEXPORT QoreString* substr(qore_offset_t offset, ExceptionSink* xsink) const;
672
674
683
685
694 DLLEXPORT QoreString* regexSubst(QoreString& match, QoreString& subst, int opts, ExceptionSink* xsink) const;
695
697
707 DLLEXPORT int regexSubst(QoreString& output, QoreString& match, QoreString& subst, int opts,
708 ExceptionSink* xsink) const;
709
711
721 DLLEXPORT int regexSubstInPlace(QoreString& match, QoreString& subst, int opts, ExceptionSink* xsink) const;
722
724
736 DLLEXPORT QoreListNode* split(const char* sep, bool with_separator = false);
737
739
752 DLLEXPORT QoreListNode* split(ExceptionSink* xsink, const char* sep, const char* quote,
753 bool trim_unquoted = false);
754
756 DLLEXPORT size_t chomp();
757
759 DLLEXPORT const QoreEncoding* getEncoding() const;
760
762 DLLEXPORT QoreString* copy() const;
763
765
767 DLLEXPORT void tolwr();
768
770
772 DLLEXPORT void toupr();
773
775 DLLEXPORT size_t strlen() const;
776
778 DLLEXPORT size_t size() const;
779
781 DLLEXPORT size_t capacity() const;
782
784 DLLEXPORT const char* getBuffer() const;
785
787 DLLEXPORT const char* c_str() const;
788
790
792 DLLEXPORT void allocate(unsigned requested_size);
793
795
801 DLLEXPORT int insertch(char c, size_t pos, unsigned times);
802
804
809 DLLEXPORT int insert(const char* str, size_t pos);
810
812 DLLEXPORT void addch(char c, unsigned times);
813
815
821 DLLEXPORT void concatUTF8FromUnicode(unsigned code);
822
824
828 DLLEXPORT int concatUnicode(unsigned code, ExceptionSink* xsink);
829
831
835 DLLEXPORT int concatUnicode(unsigned code);
836
838
841 DLLEXPORT QoreString* reverse() const;
842
844
846 DLLEXPORT void trim_trailing(const char* chars = 0);
847
849
851 DLLEXPORT void trim_leading(const char* chars = 0);
852
854
856 DLLEXPORT void trim(const char* chars = 0);
857
859
861 DLLEXPORT void trim_trailing(char c);
862
864
866 DLLEXPORT void trim_single_trailing(char c);
867
869
871 DLLEXPORT void trim_leading(char c);
872
874
876 DLLEXPORT void trim_single_leading(char c);
877
879
881 DLLEXPORT void trim(char c);
882
884
890 DLLEXPORT int trim(ExceptionSink* xsink, const QoreString* chars = nullptr);
891
893
899 DLLEXPORT int trimLeading(ExceptionSink* xsink, const QoreString* chars = nullptr);
900
902
908 DLLEXPORT int trimTrailing(ExceptionSink* xsink, const QoreString* chars = nullptr);
909
911
915 DLLEXPORT unsigned int getUnicodePointFromUTF8(qore_offset_t offset = 0) const;
916
918
923 DLLEXPORT unsigned int getUnicodePoint(qore_offset_t offset, ExceptionSink* xsink) const;
924
926
934 DLLEXPORT unsigned int getUnicodePointFromBytePos(size_t offset, unsigned& len, ExceptionSink* xsink) const;
935
937 DLLEXPORT void prepend(const char* str);
938
940 DLLEXPORT void prepend(const char* str, size_t size);
941
943 DLLEXPORT QoreString& operator=(const QoreString& other);
944
946 DLLEXPORT QoreString& operator=(const char* other);
947
949 DLLEXPORT QoreString& operator=(const std::string& other);
950
952 DLLEXPORT bool operator==(const QoreString& other) const;
953
955 DLLEXPORT bool operator==(const std::string& other) const;
956
958 DLLEXPORT bool operator==(const char* other) const;
959
961 DLLLOCAL bool operator!=(const QoreString& other) const {
962 return !(*this == other);
963 }
964
966 DLLLOCAL bool operator!=(const std::string& other) const {
967 return !(*this == other);
968 }
969
971 DLLLOCAL bool operator!=(const char* other) const {
972 return !(*this == other);
973 }
974
976
980 DLLEXPORT int operator[](qore_offset_t pos) const;
981
983 DLLEXPORT QoreString& operator+=(const char* str);
984
986 DLLEXPORT QoreString& operator+=(const std::string& str);
987
989 DLLEXPORT bool empty() const;
990
992 DLLEXPORT qore_offset_t index(const QoreString& needle, qore_offset_t pos, ExceptionSink* xsink) const;
993
995 DLLEXPORT qore_offset_t bindex(const QoreString& needle, qore_offset_t pos = 0) const;
996
998 DLLEXPORT qore_offset_t bindex(const char* needle, qore_offset_t pos = 0) const;
999
1001 DLLEXPORT qore_offset_t bindex(const std::string& needle, qore_offset_t pos = 0) const;
1002
1004
1010 DLLEXPORT qore_offset_t rindex(const QoreString& needle, qore_offset_t pos, ExceptionSink* xsink) const;
1011
1013 DLLEXPORT qore_offset_t brindex(const QoreString& needle, qore_offset_t pos = -1) const;
1014
1016 DLLEXPORT qore_offset_t brindex(const char* needle, qore_offset_t pos = -1) const;
1017
1019 DLLEXPORT qore_offset_t brindex(const std::string& needle, qore_offset_t pos = -1) const;
1020
1022 DLLEXPORT qore_offset_t find(char c, qore_offset_t pos = 0) const;
1023
1025 DLLEXPORT qore_offset_t rfind(char c, qore_offset_t pos = -1) const;
1026
1028
1030 DLLEXPORT qore_offset_t find(const char* str, qore_offset_t pos = 0) const;
1031
1033
1035 DLLEXPORT qore_offset_t rfind(const char* str, qore_offset_t pos = -1) const;
1036
1038
1040 DLLEXPORT qore_offset_t find(const std::string& str, qore_offset_t pos = 0) const;
1041
1043
1045 DLLEXPORT qore_offset_t rfind(const std::string& str, qore_offset_t pos = -1) const;
1046
1048 DLLEXPORT qore_offset_t findAny(const char *str, qore_offset_t pos = 0) const;
1049
1051 DLLEXPORT qore_offset_t rfindAny(const char *str, qore_offset_t pos = -1) const;
1052
1054
1056 DLLEXPORT bool isDataPrintableAscii() const;
1057
1059
1061 DLLEXPORT bool isDataAscii() const;
1062
1064 DLLEXPORT int64 toBigInt() const;
1065
1067
1075 DLLEXPORT size_t getCharWidth(ExceptionSink* xsink) const;
1076
1078
1083 DLLEXPORT qore_offset_t getByteOffset(size_t i, ExceptionSink* xsink) const;
1084
1085 // concatenates a qorestring without converting encodings - internal only
1086 DLLLOCAL void concat(const QoreString* str);
1087
1088 // private constructor
1089 DLLLOCAL QoreString(struct qore_string_private* p);
1090
1091protected:
1093 hashdecl qore_string_private* priv = nullptr;
1094
1095 // writes a new QoreString with the characters reversed of the "this" QoreString
1096 // assumes the encoding is the same and the length is 0
1097 DLLLOCAL void concat_reverse(QoreString* targ) const;
1098
1099 DLLLOCAL int snprintf(size_t size, const char* fmt, ...);
1100 DLLLOCAL int vsnprintf(size_t size, const char* fmt, va_list args);
1101};
1102
1103DLLEXPORT QoreString* checkEncoding(const QoreString* str, const QoreEncoding* enc, ExceptionSink* xsink);
1104
1105class QoreStringMaker : public QoreString {
1106public:
1108
1110 DLLEXPORT QoreStringMaker(const char* fmt, ...);
1111
1113
1115 DLLEXPORT QoreStringMaker(const QoreEncoding* enc, const char* fmt, ...);
1116
1117private:
1118 DLLLOCAL QoreStringMaker(const QoreStringMaker& str) = delete;
1119 DLLLOCAL QoreStringMaker& operator=(const QoreStringMaker&) = delete;
1120};
1121
1123
1133public:
1135 DLLLOCAL TempString() : str(new QoreString) {
1136 }
1137
1139 DLLLOCAL TempString(const QoreEncoding* enc) : str(new QoreString(enc)) {
1140 }
1141
1143 DLLLOCAL TempString(QoreString* s) {
1144 str = s;
1145 }
1146
1148 DLLLOCAL ~TempString() {
1149 delete str;
1150 }
1151
1153 DLLLOCAL QoreString* operator->(){ return str; };
1154
1156 DLLLOCAL QoreString* operator*() { return str; };
1157
1159 DLLLOCAL operator bool() const { return str != nullptr; }
1160
1162 DLLLOCAL QoreString* release() {
1163 QoreString* rv = str;
1164 str = nullptr;
1165 return rv;
1166 }
1167
1168private:
1169 QoreString* str;
1170
1171 TempString(const TempString&) = delete;
1172 TempString& operator=(const TempString&) = delete;
1173 void* operator new(size_t) = delete;
1174};
1175
1177
1192public:
1194
1199 DLLLOCAL TempEncodingHelper(const QoreString& s, const QoreEncoding* qe, ExceptionSink* xsink) {
1200 set_intern(&s, qe, xsink);
1201 }
1202
1204
1209 DLLLOCAL TempEncodingHelper(const QoreString* s, const QoreEncoding* qe, ExceptionSink* xsink) {
1210 set_intern(s, qe, xsink);
1211 }
1212
1215 }
1216
1219 discard_intern();
1220 }
1221
1223
1232 DLLLOCAL int set(const QoreString* s, const QoreEncoding* qe, ExceptionSink* xsink) {
1233 discard_intern();
1234
1235 set_intern(s, qe, xsink);
1236 return str != nullptr;
1237 }
1238
1240 DLLLOCAL bool is_temp() const {
1241 return temp;
1242 }
1243
1245 DLLLOCAL void makeTemp() {
1246 if (!temp && str) {
1247 str = new QoreString(*str);
1248 temp = true;
1249 }
1250 }
1251
1253 DLLLOCAL const QoreString* operator->(){ return str; };
1254
1256 DLLLOCAL const QoreString* operator*() { return str; };
1257
1259
1262 DLLLOCAL operator bool() const { return str != 0; }
1263
1265
1268 DLLLOCAL char* giveBuffer() {
1269 if (!str)
1270 return nullptr;
1271 if (temp)
1272 return str->giveBuffer();
1273 return strdup(str->getBuffer());
1274 }
1275
1277
1279 DLLEXPORT void removeBom();
1280
1281private:
1282 QoreString* str = nullptr;
1283 bool temp = false;
1284
1285 DLLLOCAL TempEncodingHelper(const TempEncodingHelper&) = delete;
1286 DLLLOCAL TempEncodingHelper& operator=(const TempEncodingHelper&) = delete;
1287 DLLLOCAL void* operator new(size_t) = delete;
1288
1290 DLLLOCAL void discard_intern() {
1291 if (temp && str)
1292 delete str;
1293 }
1294
1296
1301 DLLLOCAL void set_intern(const QoreString* s, const QoreEncoding* qe, ExceptionSink* xsink) {
1302 if (s->getEncoding() != qe) {
1303 str = s->convertEncoding(qe, xsink);
1304 temp = true;
1305 } else {
1306 str = const_cast<QoreString* >(s);
1307 temp = false;
1308 }
1309 }
1310};
1311
1313
1315DLLEXPORT size_t qore_get_unicode_character_width(int ucs);
1316
1317#endif
DLLEXPORT const QoreEncoding * QCS_DEFAULT
the default encoding for the Qore library
holds arbitrary binary data
Definition: BinaryNode.h:41
Holds absolute and relative date/time values in Qore with precision to the microsecond.
Definition: DateTime.h:93
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:50
defines string encoding functions in Qore
Definition: QoreEncoding.h:83
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:93
DLLEXPORT int concatEncodeUriRequest(ExceptionSink *xsink, const QoreString &url)
concatenates a URI-encoded version of the c-string passed
DLLEXPORT void set(const char *str, const QoreEncoding *new_qorecharset=QCS_DEFAULT)
copies the c-string passed and sets the value of the string and its encoding
DLLEXPORT void concatBase64Url(const BinaryNode &bin)
concatenates the base64-url-encoded version of the binary data passed
DLLEXPORT QoreString(const QoreEncoding *new_qorecharset)
creates an empty string and assigns the encoding passed
DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, QoreValue strn, ExceptionSink *xsink)
removes "length" characters from the string starting at position "offset" and replaces them with the ...
DLLEXPORT bool endsWith(const std::string &str) const
returns true if the current string ends with the argument string (bytes)
DLLEXPORT size_t capacity() const
returns number of bytes allocated for the string's buffer, capacity is always >= size
DLLEXPORT void concatBase64(const QoreString *str)
concatenates the base64-encoded version of the binary data passed
DLLEXPORT QoreString & operator+=(const std::string &str)
concatenates the characters to the string; assumes the string to be concatenated is already in the ch...
DLLEXPORT const char * c_str() const
returns the string's buffer; this data should not be changed
DLLEXPORT int trim(ExceptionSink *xsink, const QoreString *chars=nullptr)
removes leading and trailing whitespace or other characters
DLLEXPORT void concatAndHTMLDecode(const char *str, size_t slen)
concatenates HTML-decoded version of the c-string passed with the given length
DLLEXPORT void reset()
reset string to zero length; memory is deallocated; string encoding is reset to QCS_DEFAULT
DLLEXPORT void takeAndTerminate(char *str, size_t size)
takes ownership of the character pointer passed and assigns it to the string (frees memory previously...
DLLEXPORT size_t strlen() const
returns number of bytes in the string (not including the null pointer)
DLLEXPORT QoreString * copy() const
returns an exact copy of the string
DLLEXPORT int concatUnicode(unsigned code)
append a character sequence from a unicode code point (returns 0 for OK, -1 for error)
DLLEXPORT void concatISO8601DateTime(const DateTime *d)
concatenates a DateTime value to a string in the format YYYYMMDDTHH:mm:SS <- where the "T" is a liter...
DLLEXPORT bool startsWith(const std::string &str) const
returns true if the current string starts with the argument string (bytes)
DLLEXPORT void take(char *str, size_t size, const QoreEncoding *enc)
takes ownership of the character pointer passed and assigns it to the string (frees memory previously...
DLLEXPORT void splice(qore_offset_t offset, ExceptionSink *xsink)
removes characters from the string starting at position "offset"
DLLEXPORT void trim_single_leading(char c)
remove a single leading character if present
DLLEXPORT QoreString * parseBase64UrlToString(const QoreEncoding *enc, ExceptionSink *xsink) const
Parses the current string data as base64-URL-encoded data and returns a QoreString pointer owned by t...
DLLEXPORT QoreString & operator=(const char *other)
assigns the value of one string to another; note that in this case the string is assigned the default...
DLLEXPORT void concatHex(const char *buf, size_t size)
concatenates hexidecimal digits corresponding to the binary data passed up to byte "len"
DLLEXPORT QoreString * extract(qore_offset_t offset, qore_offset_t length, QoreValue strn, ExceptionSink *xsink)
removes "length" characters from the string starting at position "offset" and replaces them with the ...
DLLEXPORT int insertch(char c, size_t pos, unsigned times)
insert a character at a certain position in the string a number of times
DLLEXPORT void trim_leading(const char *chars=0)
remove leading whitespace or other characters
DLLLOCAL bool operator!=(const std::string &other) const
returns true if the other string is not equal to this string (encodings also must be equal)
Definition: QoreString.h:966
DLLEXPORT void take(char *str)
takes ownership of the character pointer passed and assigns it to the string (frees memory previously...
DLLEXPORT void concatBase64(const char *buf, size_t size, size_t maxlinelen)
concatenates the base64-encoded version of the binary data passed
DLLEXPORT int compare(const QoreString *str) const
compares two strings without converting encodings (if the encodings do not match then "this" is deeme...
DLLEXPORT int operator[](qore_offset_t pos) const
returns the byte (not character) at the given location; if the location is invalid,...
DLLEXPORT void clear()
reset string to zero length; memory is not deallocated; string encoding does not change
DLLEXPORT qore_offset_t bindex(const std::string &needle, qore_offset_t pos=0) const
returns the byte position of a substring within the string or -1 if not found
DLLEXPORT void concatEscape(const char *str, char c, char esc_char='\\')
concatenates a string and escapes character c with esc_char
DLLEXPORT void concatHex(const QoreString *str)
concatenates hexidecimal digits corresponding to the QoreString data passed interpreted as binary dat...
DLLEXPORT char * giveBuffer()
returns the character buffer and leaves the QoreString empty, the caller owns the memory returned (mu...
DLLEXPORT unsigned int getUnicodePoint(qore_offset_t offset, ExceptionSink *xsink) const
return Unicode code point for the single character at the given character (not byte) offset in the st...
DLLEXPORT bool equalPartial(const QoreString &str) const
returns true if the beginning of the current string matches the argument string, false if not,...
DLLEXPORT bool isDataAscii() const
returns true if the string is empty or has no characters with the high bit set (ie all characters < 1...
DLLEXPORT QoreString(const QoreString *str, size_t len)
creates a copy of the QoreString argument passed up to byte "len" and assigns "len" as the byte lengt...
DLLEXPORT void prepend(const char *str, size_t size)
prepends the string given to the string, assumes character encoding is the same as the string's
DLLEXPORT QoreString * extract(qore_offset_t offset, qore_offset_t length, ExceptionSink *xsink)
removes "length" characters from the string starting at position "offset" and returns a string of the...
DLLEXPORT bool equalPartialSoft(const QoreString &str, ExceptionSink *xsink) const
returns true if the beginning of the current string matches the argument string, false if not,...
DLLEXPORT qore_offset_t index(const QoreString &needle, qore_offset_t pos, ExceptionSink *xsink) const
returns the character position of a substring within the string or -1 if not found
DLLEXPORT void concatUTF8FromUnicode(unsigned code)
append a UTF-8 character sequence from a unicode code point, assumes the string is tagged with QCS_UT...
DLLEXPORT void terminate(size_t size)
terminates the string at byte position "size", the string is reallocated if necessary
DLLEXPORT void allocate(unsigned requested_size)
Ensure the internal buffer has at least expected size in bytes.
DLLEXPORT void replaceChar(size_t offset, char c)
replaces a byte with the byte passed
DLLEXPORT int trimTrailing(ExceptionSink *xsink, const QoreString *chars=nullptr)
removes trailing whitespace or other characters
DLLEXPORT QoreString * parseBase64ToString(const QoreEncoding *enc, ExceptionSink *xsink) const
parses the current string data as base64-encoded data and returns it as a QoreString pointer owned by...
DLLEXPORT int64 toBigInt() const
returns the value of the string as an int64
DLLEXPORT size_t getCharWidth(ExceptionSink *xsink) const
returns the character width of the string
DLLEXPORT QoreString(const QoreString &str)
creates a copy of the QoreString argument passed
DLLEXPORT QoreString * regexSubst(QoreString &match, QoreString &subst, int opts, ExceptionSink *xsink) const
performs perl5-compatible regular expression substitution
DLLEXPORT int regexSubstInPlace(QoreString &match, QoreString &subst, int opts, ExceptionSink *xsink) const
performs perl5-compatible regular expression substitution to the current string
DLLEXPORT void concatAndHTMLEncode(const QoreString *str, ExceptionSink *xsink)
concatenation with HTML special character encoding
DLLEXPORT void reserve(size_t size)
ensures that at least the given size is available in the string; the string's contents are not affect...
DLLEXPORT qore_offset_t brindex(const QoreString &needle, qore_offset_t pos=-1) const
returns the byte position of a substring within the string searching in reverse from a given position...
DLLEXPORT void concat(const QoreString *str, ExceptionSink *xsink)
concatenates a string and converts encodings if necessary
DLLEXPORT int regexSubst(QoreString &output, QoreString &match, QoreString &subst, int opts, ExceptionSink *xsink) const
performs perl5-compatible regular expression substitution
DLLEXPORT size_t length() const
returns the number of characters (not bytes) in the string
DLLEXPORT const char * getBuffer() const
returns the string's buffer; this data should not be changed
DLLEXPORT qore_offset_t find(char c, qore_offset_t pos=0) const
returns the byte position of a character (byte) within the string or -1 if not found
DLLEXPORT bool endsWith(const char *str) const
returns true if the current string ends with the argument string (bytes)
DLLEXPORT qore_offset_t find(const std::string &str, qore_offset_t pos=0) const
returns the byte position of a string byte sequence) within the string or -1 if not found
DLLEXPORT void trim_trailing(const char *chars=0)
remove trailing whitespace or other characters
DLLEXPORT qore_offset_t findAny(const char *str, qore_offset_t pos=0) const
returns the byte position of any of the given characters (bytes) within the string or -1 if not found
DLLEXPORT void concatEscape(const QoreString *str, char c, char esc_char, ExceptionSink *xsink)
concatenates a string and escapes character c with esc_char (converts encodings if necessary)
DLLLOCAL bool operator!=(const char *other) const
returns true if the other string is not equal to this string (encodings also must be equal)
Definition: QoreString.h:971
DLLEXPORT void takeAndTerminate(char *str, size_t size, const QoreEncoding *enc)
takes ownership of the character pointer passed and assigns it to the string (frees memory previously...
DLLEXPORT const QoreEncoding * getEncoding() const
returns the encoding for the string
DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, const QoreString &str, ExceptionSink *xsink)
removes "length" characters from the string starting at position "offset" and replaces them with the ...
DLLEXPORT bool equalPartialPath(const QoreString &str, ExceptionSink *xsink) const
returns true if the begining of the current string matches the argument string where either both stri...
DLLEXPORT bool equal(const char *str) const
returns true if the strings are equal, false if not (encodings are assumed to be equal)
DLLEXPORT QoreString(const BinaryNode *bin, size_t maxlinelen)
creates a new string as the base64-encoded value of the binary object passed and ensures the maximum ...
DLLEXPORT QoreListNode * split(const char *sep, bool with_separator=false)
Splits a string into a list of components based on a separator string.
DLLEXPORT void concatAndHTMLDecode(const char *str)
concatenates HTML-decoded version of the c-string passed
DLLEXPORT void addch(char c, unsigned times)
append a character to the string a number of times
DLLEXPORT unsigned int getUnicodePointFromBytePos(size_t offset, unsigned &len, ExceptionSink *xsink) const
return Unicode code point for the given byte offset
DLLEXPORT void trim_trailing(char c)
remove trailing characters if present
DLLEXPORT QoreString(int64 i)
creates a new string with the string representation of the integer passed and assigns the default enc...
DLLEXPORT void concatHex(const BinaryNode *bin)
concatenates hexidecimal digits corresponding to the binary data passed
DLLEXPORT int sprintf(const char *fmt,...)
this will concatentate a formatted string to the existing string according to the format string and t...
DLLEXPORT BinaryNode * parseBase64(ExceptionSink *xsink) const
parses the current string data as base64-encoded data and returns it as a BinaryNode pointer (caller ...
DLLEXPORT qore_offset_t rfindAny(const char *str, qore_offset_t pos=-1) const
returns the last byte position of any of the given characters (bytes) within the string or -1 if not ...
DLLEXPORT size_t size() const
returns number of bytes in the string (not including the null pointer)
DLLEXPORT qore_offset_t brindex(const char *needle, qore_offset_t pos=-1) const
returns the byte position of a substring within the string searching in reverse from a given position...
DLLEXPORT void set(const std::string &str, const QoreEncoding *new_qorecharset=QCS_DEFAULT)
copies the string passed and sets the value of the string and its encoding
DLLEXPORT qore_offset_t rindex(const QoreString &needle, qore_offset_t pos, ExceptionSink *xsink) const
returns the character position of a substring searching in reverse from a given position or -1 if not...
DLLEXPORT int concatDecodeUriRequest(const QoreString &url, ExceptionSink *xsink)
concatenates a URI-decoded version of the c-string passed
DLLEXPORT void set(const QoreString &str)
sets the value to the copy of the QoreString passed
DLLEXPORT QoreString(const char *str, const QoreEncoding *new_qorecharset)
copies the c-string passed and assigns the encoding passed
DLLEXPORT QoreString(const DateTime *date)
creates a new string from the DateTime value passed in the format YYYYMMDDHHmmSS
DLLEXPORT QoreString * reverse() const
return a Qorestring with the characters reversed
DLLEXPORT bool startsWith(const char *str) const
returns true if the current string starts with the argument string (bytes)
DLLEXPORT int concatEncode(ExceptionSink *xsink, const QoreString &str, unsigned code=CE_XHTML)
concatenates a string and encodes it according to the encoding argument passed
DLLEXPORT BinaryNode * parseBase64Url(ExceptionSink *xsink) const
Parses the current string data as base64-URL-encoded data and returns a BinaryNode pointer.
DLLEXPORT QoreString()
creates an empty string and assigns the default encoding QCS_DEFAULT
DLLEXPORT qore_offset_t bindex(const QoreString &needle, qore_offset_t pos=0) const
returns the byte position of a substring within the string or -1 if not found
DLLEXPORT void concatAndHTMLDecode(const QoreString *str)
concatenates HTML-decoded version of the c-string passed
DLLEXPORT void concatBase64(const BinaryNode *bin)
concatenates the base64-encoded version of the binary data passed
DLLEXPORT void trim_single_trailing(char c)
remove a single trailing character if present
DLLEXPORT void concatBase64(const QoreString *str, size_t maxlinelen)
concatenates the base64-encoded version of the binary data passed
DLLEXPORT void replace(size_t offset, size_t len, const char *str)
replaces bytes with the string passed
DLLEXPORT void trim(char c)
remove leading and trailing characters if present
DLLEXPORT QoreString & operator=(const QoreString &other)
assigns the value of one string to another
DLLEXPORT qore_offset_t getByteOffset(size_t i, ExceptionSink *xsink) const
returns the byte position of the given character position in the string or -1 if the string does not ...
DLLEXPORT int compareSoft(const QoreString *str, ExceptionSink *xsink) const
compares the string with another string, performing character set encoding conversion if necessary
DLLEXPORT bool equal(const QoreString &str) const
returns true if the strings are equal, false if not, if the character encodings are different,...
DLLEXPORT void set(char *nbuf, size_t nlen, size_t nallocated, const QoreEncoding *enc)
takes ownership of the char* passed; discards current state
DLLEXPORT void trim_leading(char c)
remove leading characters if present
DLLEXPORT QoreString & operator=(const std::string &other)
assigns the value of one string to another; note that in this case the string is assigned the default...
DLLEXPORT void concatDecodeUrl(const char *url)
concatenates a URL-decoded version of the c-string passed
DLLEXPORT void concatBase64(const char *buf, size_t size)
concatenates the base64-encoded version of the binary data passed
DLLEXPORT QoreString(const char *str, size_t len, const QoreEncoding *new_qorecharset=QCS_DEFAULT)
copies the c-string passed and assigns the length and encoding passed
DLLEXPORT BinaryNode * parseHex(ExceptionSink *xsink) const
parses the current string data as hexadecimal-encoded data and returns it as a BinaryNode pointer (ca...
DLLEXPORT void concat(const DateTime *d)
concatenates a DateTime value to a string in the format YYYYMMDDHHmmSS
DLLEXPORT size_t chomp()
removes a single \n\r or \n from the end of the string and returns the number of characters removed
DLLEXPORT QoreString(bool b)
creates a single-character string (either '0' or '1') and assigns the default encoding QCS_DEFAULT
DLLEXPORT QoreListNode * split(ExceptionSink *xsink, const char *sep, const char *quote, bool trim_unquoted=false)
Splits a string into a list of components based on a separator string.
DLLEXPORT qore_offset_t rfind(const char *str, qore_offset_t pos=-1) const
returns the last byte position of a string (byte sequence) within the string or -1 if not found
DLLEXPORT void trim(const char *chars=0)
remove leading and trailing whitespace or other characters
DLLEXPORT QoreString * convertEncoding(const QoreEncoding *nccs, ExceptionSink *xsink) const
converts the encoding of the string to the specified encoding, returns 0 if an error occurs,...
DLLEXPORT void concat(const char *str)
concatenates a c-string to the existing string
DLLEXPORT QoreString(const QoreString *str)
creates a copy of the QoreString argument passed
DLLEXPORT void toupr()
converts the string to upper-case in place
DLLEXPORT void take(char *str, size_t size)
takes ownership of the character pointer passed and assigns it to the string (frees memory previously...
DLLEXPORT QoreString * parseBase64ToString(ExceptionSink *xsink) const
parses the current string data as base64-encoded data and returns it as a QoreString pointer owned by...
DLLLOCAL bool operator!=(const QoreString &other) const
returns true if the other string is not equal to this string (encodings also must be equal)
Definition: QoreString.h:961
DLLEXPORT void concat(const QoreString *str, size_t size, ExceptionSink *xsink)
concatenates a QoreString up to character "len"
DLLEXPORT int concatDecodeUrl(const QoreString &url, ExceptionSink *xsink)
concatenates a URL-decoded version of the c-string passed (RFC 3986 compliant: http://tools....
DLLEXPORT QoreString(const char *str)
copies the c-string passed and assigns the default encoding QCS_DEFAULT
DLLEXPORT qore_offset_t rfind(char c, qore_offset_t pos=-1) const
returns the last byte position of a character (byte) within the string or -1 if not found
DLLEXPORT bool operator==(const QoreString &other) const
returns true if the other string is equal to this string (encodings also must be equal)
DLLEXPORT QoreString * substr(qore_offset_t offset, ExceptionSink *xsink) const
returns a new string consisting of all the characters from the current string starting with character...
DLLEXPORT void setEncoding(const QoreEncoding *new_encoding)
changes the tagged encoding to the given encoding; does not affect the actual string buffer,...
DLLEXPORT bool empty() const
returns true if the string is empty, false if not
DLLEXPORT unsigned int getUnicodePointFromUTF8(qore_offset_t offset=0) const
return Unicode code point for character offset, string must be UTF-8
DLLEXPORT int concat(const QoreString &str, qore_offset_t pos, ExceptionSink *xsink)
concatenates a string and converts encodings if necessary
DLLEXPORT QoreString(const std::string &str, const QoreEncoding *new_encoding=QCS_DEFAULT)
copies the std::string passed and assigns the encoding passed
DLLEXPORT qore_offset_t rfind(const std::string &str, qore_offset_t pos=-1) const
returns the last byte position of a string (byte sequence) within the string or -1 if not found
DLLEXPORT bool operator==(const std::string &other) const
returns true if the other string is equal to this string (encodings also must be equal)
DLLEXPORT int concat(const QoreString &str, qore_offset_t pos, qore_offset_t len, ExceptionSink *xsink)
concatenates a string and converts encodings if necessary
DLLEXPORT QoreString * extract(qore_offset_t offset, ExceptionSink *xsink)
removes characters from the string starting at position "offset" and returns a string of the characte...
DLLEXPORT int vsprintf(const char *fmt, va_list args)
this will concatentate a formatted string to the existing string according to the format string and t...
DLLEXPORT int compare(const char *str) const
compares the string with a c-string, which is assumed to be in the same encoding as the string
DLLEXPORT void prepend(const char *str)
prepends the string given to the string, assumes character encoding is the same as the string's
DLLEXPORT int insert(const char *str, size_t pos)
inserts a character string at a certain position in the string
DLLEXPORT void concatBase64Url(const QoreString &str)
concatenates the base64-url-encoded version of the binary data passed
DLLEXPORT QoreString(char *nbuf, size_t nlen, size_t nallocated, const QoreEncoding *enc)
takes ownership of the char* passed
DLLEXPORT int concatEncodeUrl(ExceptionSink *xsink, const QoreString &url, bool encode_all=false)
concatenates a URL-encoded version of the c-string passed
DLLEXPORT qore_offset_t bindex(const char *needle, qore_offset_t pos=0) const
returns the byte position of a substring within the string or -1 if not found
DLLEXPORT void concatAndHTMLEncode(const char *str)
concatenates HTML-encoded version of the c-string passed
DLLEXPORT void concat(const char c)
concatenates a single character to the string
DLLEXPORT bool isDataPrintableAscii() const
returns true if the string is empty or only contains printable non-control ASCII characters (ie all c...
DLLEXPORT int trimLeading(ExceptionSink *xsink, const QoreString *chars=nullptr)
removes leading whitespace or other characters
DLLEXPORT int concatDecode(ExceptionSink *xsink, const QoreString &str, unsigned code=CD_ALL)
concatenates a string and decodes HTML, XML, and numeric character references as per the supplied arg...
DLLEXPORT void set(const char *str, size_t len)
copies the c-string passed and sets the value of the string up to the byte position given
DLLEXPORT void set(const QoreString *str)
sets the value to the copy of the QoreString passed
DLLEXPORT bool equalPartial(const char *str) const
returns true if the beginning of the current string matches the argument string, false if not (encodi...
DLLEXPORT void concatBase64(const BinaryNode *bin, size_t maxlinelen)
concatenates the base64-encoded version of the binary data passed
hashdecl qore_string_private * priv
the private implementation of QoreString
Definition: QoreString.h:1093
DLLEXPORT void replaceAll(const char *old_str, const char *new_str)
replaces all occurences of the first string with the second string
DLLEXPORT qore_offset_t brindex(const std::string &needle, qore_offset_t pos=-1) const
returns the byte position of a substring within the string searching in reverse from a given position...
DLLEXPORT void concat(const std::string &str)
concatenates an stl string to the existing string
DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, ExceptionSink *xsink)
removes "length" characters from the string starting at position "offset"
DLLEXPORT QoreString(const BinaryNode *bin)
creates a new string as the base64-encoded value of the binary object passed
DLLEXPORT QoreString(char c)
creates a single-character string from the argument and assigns the default encoding QCS_DEFAULT
DLLEXPORT QoreString * parseBase64UrlToString(ExceptionSink *xsink) const
Parses the current string data as base64-URL-encoded data and returns a QoreString pointer owned by t...
DLLEXPORT QoreString * substr(qore_offset_t offset, qore_offset_t length, ExceptionSink *xsink) const
returns a new string consisting of "length" characters from the current string starting with characte...
DLLEXPORT void take(char *str, const QoreEncoding *enc)
takes ownership of the character pointer passed and assigns it to the string (frees memory previously...
DLLEXPORT void concat(const char *str, size_t size)
concatenates a c-string to the existing string, up to byte "size"
DLLEXPORT qore_offset_t find(const char *str, qore_offset_t pos=0) const
returns the byte position of a string byte sequence) within the string or -1 if not found
DLLEXPORT int concatUnicode(unsigned code, ExceptionSink *xsink)
append a character sequence from a unicode code point (returns 0 for OK, -1 for exception)
DLLEXPORT void replace(size_t offset, size_t len, const QoreString *str, ExceptionSink *xsink)
replaces bytes with the string passed
DLLEXPORT QoreString & operator+=(const char *str)
concatenates the characters to the string; assumes the string to be concatenated is already in the ch...
DLLEXPORT bool equalSoft(const QoreString &str, ExceptionSink *xsink) const
returns true if the strings are equal, false if not, if the character encodings are different,...
DLLEXPORT void tolwr()
converts the string to lower-case in place
DLLEXPORT bool operator==(const char *other) const
returns true if the other string is equal to this string (encodings also must be equal)
DLLEXPORT QoreString(double f)
creates a new string with the string representation of the floating-point value passed and assigns th...
DLLEXPORT ~QoreString()
frees any memory allocated by the string
use this class to manage strings where the character encoding must be specified and may be different ...
Definition: QoreString.h:1191
DLLLOCAL TempEncodingHelper(const QoreString *s, const QoreEncoding *qe, ExceptionSink *xsink)
converts the given string to the required encoding if necessary
Definition: QoreString.h:1209
DLLLOCAL ~TempEncodingHelper()
deletes any temporary string being managed by the object
Definition: QoreString.h:1218
DLLEXPORT void removeBom()
remove any leading byte order marker (BOM) from UTF-16* strings
DLLLOCAL char * giveBuffer()
returns a char pointer of the string, the caller owns the pointer returned (it must be manually freed...
Definition: QoreString.h:1268
DLLLOCAL TempEncodingHelper()
creates an empty TempEncodingHelperObject that may be initialized with TempEncodingHelper::set() late...
Definition: QoreString.h:1214
DLLLOCAL void makeTemp()
ensures that the object is holding a temporary value
Definition: QoreString.h:1245
DLLLOCAL const QoreString * operator*()
returns the string being managed
Definition: QoreString.h:1256
DLLLOCAL int set(const QoreString *s, const QoreEncoding *qe, ExceptionSink *xsink)
discards any current state and sets and converts (if necessary) a new string to the desired encoding
Definition: QoreString.h:1232
DLLLOCAL TempEncodingHelper(const QoreString &s, const QoreEncoding *qe, ExceptionSink *xsink)
converts the given string to the required encoding if necessary
Definition: QoreString.h:1199
DLLLOCAL const QoreString * operator->()
returns the string being managed
Definition: QoreString.h:1253
DLLLOCAL bool is_temp() const
returns true if a temporary string is being managed
Definition: QoreString.h:1240
class used to hold a possibly temporary QoreString pointer, stack only, cannot be dynamically allocat...
Definition: QoreString.h:1132
DLLLOCAL QoreString * operator->()
returns the QoreString pointer being managed
Definition: QoreString.h:1153
DLLLOCAL TempString()
populates the object with a new QoreString that this object will manage
Definition: QoreString.h:1135
DLLLOCAL QoreString * operator*()
returns the QoreString pointer being managed
Definition: QoreString.h:1156
DLLLOCAL TempString(const QoreEncoding *enc)
populates the object with a new QoreString in a specific encoding that this object will manage
Definition: QoreString.h:1139
DLLLOCAL QoreString * release()
releases the QoreString pointer being managed and sets the internal pointer to 0
Definition: QoreString.h:1162
DLLLOCAL TempString(QoreString *s)
populates the object with the QoreString pointer to be managed
Definition: QoreString.h:1143
DLLLOCAL ~TempString()
deletes the QoreString pointer being managed
Definition: QoreString.h:1148
intptr_t qore_offset_t
used for offsets that could be negative
Definition: common.h:76
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition: common.h:260
#define CD_ALL
code for decoding everything
Definition: QoreString.h:73
#define CE_XHTML
code for encoding XHTML entities
Definition: QoreString.h:55
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:279