Loading...
Searching...
No Matches
QoreString.h
/* -*- mode: c++; indent-tabs-mode: nil -*- */
/*
QoreString.h
QoreString Class Definition
Qore Programming Language
Copyright (C) 2003 - 2022 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Note that the Qore library is released under a choice of three open-source
licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
information.
*/
#ifndef _QORE_QORESTRING_H
#define _QORE_QORESTRING_H
#include <cstdarg>
#include <string>
class DateTime;
class BinaryNode;
#define CE_HTML (1 << 0)
#define CE_XML (1 << 1)
#define CE_NONASCII (1 << 2)
#define CE_XHTML (CE_HTML | CE_XML)
#define CE_ALL (CE_XHTML | CE_NONASCII)
#define CD_HTML (1 << 0)
#define CD_XML (1 << 1)
#define CD_NUM_REF (1 << 2)
#define CD_XHTML (CD_HTML | CD_XML)
#define CD_ALL (CD_XHTML | CD_NUM_REF)
#define QS_RE_GLOBAL (1 << 0)
#define QS_RE_CASELESS (1 << 1)
#define QS_RE_DOTALL (1 << 2)
#define QS_RE_EXTENDED (1 << 3)
#define QS_RE_MULTILINE (1 << 4)
class QoreString {
friend struct qore_string_private;
public:
DLLEXPORT QoreString();
DLLEXPORT QoreString(bool b);
DLLEXPORT QoreString(const char* str);
DLLEXPORT QoreString(const char* str, const QoreEncoding* new_qorecharset);
DLLEXPORT QoreString(const QoreEncoding* new_qorecharset);
DLLEXPORT QoreString(const char* str, size_t len, const QoreEncoding* new_qorecharset = QCS_DEFAULT);
DLLEXPORT QoreString(const std::string& str, const QoreEncoding* new_encoding = QCS_DEFAULT);
DLLEXPORT QoreString(char c);
DLLEXPORT QoreString(const QoreString& str);
DLLEXPORT QoreString(const QoreString* str);
DLLEXPORT QoreString(const QoreString* str, size_t len);
DLLEXPORT QoreString(int64 i);
DLLEXPORT QoreString(double f);
DLLEXPORT QoreString(const DateTime* date);
DLLEXPORT QoreString(const BinaryNode* bin);
DLLEXPORT QoreString(const BinaryNode* bin, size_t maxlinelen);
DLLEXPORT QoreString(char* nbuf, size_t nlen, size_t nallocated, const QoreEncoding* enc);
DLLEXPORT ~QoreString();
DLLEXPORT size_t length() const;
DLLEXPORT void set(const char* str, const QoreEncoding* new_qorecharset = QCS_DEFAULT);
DLLEXPORT void set(const char* str, size_t len);
DLLEXPORT void set(const std::string& str, const QoreEncoding* new_qorecharset = QCS_DEFAULT);
DLLEXPORT void set(const QoreString* str);
DLLEXPORT void set(const QoreString& str);
DLLEXPORT void set(char* nbuf, size_t nlen, size_t nallocated, const QoreEncoding* enc);
DLLEXPORT void setEncoding(const QoreEncoding* new_encoding);
DLLEXPORT int concatEncode(ExceptionSink* xsink, const QoreString& str, unsigned code = CE_XHTML);
DLLEXPORT int concatDecode(ExceptionSink* xsink, const QoreString& str, unsigned code = CD_ALL);
DLLEXPORT void concatAndHTMLEncode(const char* str);
DLLEXPORT void concatAndHTMLDecode(const QoreString* str);
DLLEXPORT void concatAndHTMLDecode(const char* str, size_t slen);
DLLEXPORT void concatAndHTMLDecode(const char* str);
DLLEXPORT void concatDecodeUrl(const char* url);
DLLEXPORT int concatDecodeUrl(const QoreString& url, ExceptionSink* xsink);
DLLEXPORT int concatEncodeUrl(ExceptionSink* xsink, const QoreString& url, bool encode_all = false);
DLLEXPORT int concatDecodeUriRequest(const QoreString& url, ExceptionSink* xsink);
DLLEXPORT int concatEncodeUriRequest(ExceptionSink* xsink, const QoreString& url);
DLLEXPORT void concatEscape(const QoreString* str, char c, char esc_char, ExceptionSink* xsink);
DLLEXPORT void concatEscape(const char* str, char c, char esc_char = '\\');
DLLEXPORT void concatAndHTMLEncode(const QoreString* str, ExceptionSink* xsink);
DLLEXPORT void concat(const QoreString* str, ExceptionSink* xsink);
DLLEXPORT int concat(const QoreString& str, qore_offset_t pos, ExceptionSink* xsink);
DLLEXPORT int concat(const QoreString& str, qore_offset_t pos, qore_offset_t len, ExceptionSink* xsink);
DLLEXPORT void concat(const QoreString* str, size_t size, ExceptionSink* xsink);
DLLEXPORT void concatBase64(const char* buf, size_t size);
DLLEXPORT void concatBase64(const BinaryNode* bin);
DLLEXPORT void concatBase64(const QoreString* str);
DLLEXPORT void concatBase64(const char* buf, size_t size, size_t maxlinelen);
DLLEXPORT void concatBase64(const BinaryNode* bin, size_t maxlinelen);
DLLEXPORT void concatBase64(const QoreString* str, size_t maxlinelen);
DLLEXPORT BinaryNode* parseBase64(ExceptionSink* xsink) const;
DLLEXPORT QoreString* parseBase64ToString(ExceptionSink* xsink) const;
DLLEXPORT QoreString* parseBase64ToString(const QoreEncoding* enc, ExceptionSink* xsink) const;
DLLEXPORT void concatHex(const char* buf, size_t size);
DLLEXPORT void concatHex(const BinaryNode* bin);
DLLEXPORT void concatHex(const QoreString* str);
DLLEXPORT BinaryNode* parseHex(ExceptionSink* xsink) const;
DLLEXPORT void concat(const DateTime* d);
DLLEXPORT void concatISO8601DateTime(const DateTime* d);
DLLEXPORT void concat(const char* str);
DLLEXPORT void concat(const std::string& str);
DLLEXPORT void concat(const char* str, size_t size);
DLLEXPORT void concat(const char c);
DLLEXPORT int compareSoft(const QoreString* str, ExceptionSink* xsink) const;
DLLEXPORT int compare(const QoreString* str) const;
DLLEXPORT int compare(const char* str) const;
DLLEXPORT bool equal(const QoreString& str) const;
DLLEXPORT bool equal(const char* str) const;
DLLEXPORT bool equalSoft(const QoreString& str, ExceptionSink* xsink) const;
DLLEXPORT bool equalPartial(const QoreString& str) const;
DLLEXPORT bool equalPartial(const char* str) const;
DLLEXPORT bool equalPartialSoft(const QoreString& str, ExceptionSink* xsink) const;
DLLEXPORT bool equalPartialPath(const QoreString& str, ExceptionSink* xsink) const;
DLLEXPORT bool startsWith(const char* str) const;
DLLEXPORT bool startsWith(const std::string& str) const;
DLLEXPORT bool endsWith(const char* str) const;
DLLEXPORT bool endsWith(const std::string& str) const;
DLLEXPORT void terminate(size_t size);
DLLEXPORT void reserve(size_t size);
DLLEXPORT int sprintf(const char* fmt, ...);
DLLEXPORT int vsprintf(const char* fmt, va_list args);
DLLEXPORT void take(char* str);
DLLEXPORT void take(char* str, const QoreEncoding* enc);
DLLEXPORT void take(char* str, size_t size);
DLLEXPORT void take(char* str, size_t size, const QoreEncoding* enc);
DLLEXPORT void takeAndTerminate(char* str, size_t size);
DLLEXPORT void takeAndTerminate(char* str, size_t size, const QoreEncoding* enc);
DLLEXPORT QoreString* convertEncoding(const QoreEncoding* nccs, ExceptionSink* xsink) const;
DLLEXPORT char* giveBuffer();
DLLEXPORT void clear();
DLLEXPORT void reset();
DLLEXPORT void replaceAll(const char* old_str, const char* new_str);
DLLEXPORT void replace(size_t offset, size_t len, const char* str);
DLLEXPORT void replace(size_t offset, size_t len, const QoreString* str, ExceptionSink* xsink);
DLLEXPORT void replaceChar(size_t offset, char c);
DLLEXPORT void splice(qore_offset_t offset, ExceptionSink* xsink);
DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, ExceptionSink* xsink);
DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, QoreValue strn, ExceptionSink* xsink);
DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, const QoreString& str, ExceptionSink* xsink);
DLLEXPORT QoreString* extract(qore_offset_t offset, ExceptionSink* xsink);
DLLEXPORT QoreString* extract(qore_offset_t offset, qore_offset_t length, ExceptionSink* xsink);
DLLEXPORT QoreString* extract(qore_offset_t offset, qore_offset_t length, QoreValue strn, ExceptionSink* xsink);
DLLEXPORT QoreString* substr(qore_offset_t offset, ExceptionSink* xsink) const;
DLLEXPORT QoreString* substr(qore_offset_t offset, qore_offset_t length, ExceptionSink* xsink) const;
DLLEXPORT QoreString* regexSubst(QoreString& match, QoreString& subst, int opts, ExceptionSink* xsink) const;
DLLEXPORT int regexSubst(QoreString& output, QoreString& match, QoreString& subst, int opts,
ExceptionSink* xsink) const;
DLLEXPORT int regexSubstInPlace(QoreString& match, QoreString& subst, int opts, ExceptionSink* xsink) const;
DLLEXPORT size_t chomp();
DLLEXPORT const QoreEncoding* getEncoding() const;
DLLEXPORT QoreString* copy() const;
DLLEXPORT void tolwr();
DLLEXPORT void toupr();
DLLEXPORT size_t strlen() const;
DLLEXPORT size_t size() const;
DLLEXPORT size_t capacity() const;
DLLEXPORT const char* getBuffer() const;
DLLEXPORT const char* c_str() const;
DLLEXPORT void allocate(unsigned requested_size);
DLLEXPORT int insertch(char c, size_t pos, unsigned times);
DLLEXPORT int insert(const char* str, size_t pos);
DLLEXPORT void addch(char c, unsigned times);
DLLEXPORT void concatUTF8FromUnicode(unsigned code);
DLLEXPORT int concatUnicode(unsigned code, ExceptionSink* xsink);
DLLEXPORT int concatUnicode(unsigned code);
DLLEXPORT QoreString* reverse() const;
DLLEXPORT void trim_trailing(const char* chars = 0);
DLLEXPORT void trim_leading(const char* chars = 0);
DLLEXPORT void trim(const char* chars = 0);
DLLEXPORT void trim_trailing(char c);
DLLEXPORT void trim_single_trailing(char c);
DLLEXPORT void trim_leading(char c);
DLLEXPORT void trim_single_leading(char c);
DLLEXPORT void trim(char c);
DLLEXPORT int trim(ExceptionSink* xsink, const QoreString* chars = nullptr);
DLLEXPORT int trimLeading(ExceptionSink* xsink, const QoreString* chars = nullptr);
DLLEXPORT int trimTrailing(ExceptionSink* xsink, const QoreString* chars = nullptr);
DLLEXPORT unsigned int getUnicodePointFromUTF8(qore_offset_t offset = 0) const;
DLLEXPORT unsigned int getUnicodePoint(qore_offset_t offset, ExceptionSink* xsink) const;
DLLEXPORT unsigned int getUnicodePointFromBytePos(size_t offset, unsigned& len, ExceptionSink* xsink) const;
DLLEXPORT void prepend(const char* str);
DLLEXPORT void prepend(const char* str, size_t size);
DLLEXPORT QoreString& operator=(const QoreString& other);
DLLEXPORT QoreString& operator=(const char* other);
DLLEXPORT QoreString& operator=(const std::string& other);
DLLEXPORT bool operator==(const QoreString& other) const;
DLLEXPORT bool operator==(const std::string& other) const;
DLLEXPORT bool operator==(const char* other) const;
DLLLOCAL bool operator!=(const QoreString& other) const {
return !(*this == other);
}
DLLLOCAL bool operator!=(const std::string& other) const {
return !(*this == other);
}
DLLLOCAL bool operator!=(const char* other) const {
return !(*this == other);
}
DLLEXPORT int operator[](qore_offset_t pos) const;
DLLEXPORT QoreString& operator+=(const char* str);
DLLEXPORT QoreString& operator+=(const std::string& str);
DLLEXPORT bool empty() const;
DLLEXPORT qore_offset_t index(const QoreString& needle, qore_offset_t pos, ExceptionSink* xsink) const;
DLLEXPORT qore_offset_t bindex(const QoreString& needle, qore_offset_t pos = 0) const;
DLLEXPORT qore_offset_t bindex(const char* needle, qore_offset_t pos = 0) const;
DLLEXPORT qore_offset_t bindex(const std::string& needle, qore_offset_t pos = 0) const;
DLLEXPORT qore_offset_t rindex(const QoreString& needle, qore_offset_t pos, ExceptionSink* xsink) const;
DLLEXPORT qore_offset_t brindex(const QoreString& needle, qore_offset_t pos = -1) const;
DLLEXPORT qore_offset_t brindex(const char* needle, qore_offset_t pos = -1) const;
DLLEXPORT qore_offset_t brindex(const std::string& needle, qore_offset_t pos = -1) const;
DLLEXPORT qore_offset_t find(char c, qore_offset_t pos = 0) const;
DLLEXPORT qore_offset_t rfind(char c, qore_offset_t pos = -1) const;
DLLEXPORT qore_offset_t find(const char* str, qore_offset_t pos = 0) const;
DLLEXPORT qore_offset_t rfind(const char* str, qore_offset_t pos = -1) const;
DLLEXPORT qore_offset_t find(const std::string& str, qore_offset_t pos = 0) const;
DLLEXPORT qore_offset_t rfind(const std::string& str, qore_offset_t pos = -1) const;
DLLEXPORT qore_offset_t findAny(const char *str, qore_offset_t pos = 0) const;
DLLEXPORT qore_offset_t rfindAny(const char *str, qore_offset_t pos = -1) const;
DLLEXPORT bool isDataPrintableAscii() const;
DLLEXPORT bool isDataAscii() const;
DLLEXPORT int64 toBigInt() const;
DLLEXPORT size_t getCharWidth(ExceptionSink* xsink) const;
DLLEXPORT qore_offset_t getByteOffset(size_t i, ExceptionSink* xsink) const;
// concatenates a qorestring without converting encodings - internal only
DLLLOCAL void concat(const QoreString* str);
// private constructor
DLLLOCAL QoreString(struct qore_string_private* p);
protected:
struct qore_string_private* priv = nullptr;
// writes a new QoreString with the characters reversed of the "this" QoreString
// assumes the encoding is the same and the length is 0
DLLLOCAL void concat_reverse(QoreString* targ) const;
DLLLOCAL int snprintf(size_t size, const char* fmt, ...);
DLLLOCAL int vsnprintf(size_t size, const char* fmt, va_list args);
};
DLLEXPORT QoreString* checkEncoding(const QoreString* str, const QoreEncoding* enc, ExceptionSink* xsink);
class QoreStringMaker : public QoreString {
public:
DLLEXPORT QoreStringMaker(const char* fmt, ...);
DLLEXPORT QoreStringMaker(const QoreEncoding* enc, const char* fmt, ...);
private:
DLLLOCAL QoreStringMaker(const QoreStringMaker& str) = delete;
DLLLOCAL QoreStringMaker& operator=(const QoreStringMaker&) = delete;
};
class TempString {
public:
DLLLOCAL TempString() : str(new QoreString) {
}
DLLLOCAL TempString(const QoreEncoding* enc) : str(new QoreString(enc)) {
}
DLLLOCAL TempString(QoreString* s) {
str = s;
}
DLLLOCAL ~TempString() {
delete str;
}
DLLLOCAL QoreString* operator->(){ return str; };
DLLLOCAL QoreString* operator*() { return str; };
DLLLOCAL operator bool() const { return str != nullptr; }
DLLLOCAL QoreString* release() {
QoreString* rv = str;
str = nullptr;
return rv;
}
private:
QoreString* str;
TempString(const TempString&) = delete;
TempString& operator=(const TempString&) = delete;
void* operator new(size_t) = delete;
};
class TempEncodingHelper {
public:
DLLLOCAL TempEncodingHelper(const QoreString& s, const QoreEncoding* qe, ExceptionSink* xsink) {
set_intern(&s, qe, xsink);
}
DLLLOCAL TempEncodingHelper(const QoreString* s, const QoreEncoding* qe, ExceptionSink* xsink) {
set_intern(s, qe, xsink);
}
DLLLOCAL TempEncodingHelper() {
}
DLLLOCAL ~TempEncodingHelper() {
discard_intern();
}
DLLLOCAL int set(const QoreString* s, const QoreEncoding* qe, ExceptionSink* xsink) {
discard_intern();
set_intern(s, qe, xsink);
return str != nullptr;
}
DLLLOCAL bool is_temp() const {
return temp;
}
DLLLOCAL void makeTemp() {
if (!temp && str) {
str = new QoreString(*str);
temp = true;
}
}
DLLLOCAL const QoreString* operator->(){ return str; };
DLLLOCAL const QoreString* operator*() { return str; };
DLLLOCAL operator bool() const { return str != 0; }
DLLLOCAL char* giveBuffer() {
if (!str)
return nullptr;
if (temp)
return str->giveBuffer();
return strdup(str->getBuffer());
}
DLLEXPORT void removeBom();
private:
QoreString* str = nullptr;
bool temp = false;
DLLLOCAL TempEncodingHelper(const TempEncodingHelper&) = delete;
DLLLOCAL TempEncodingHelper& operator=(const TempEncodingHelper&) = delete;
DLLLOCAL void* operator new(size_t) = delete;
DLLLOCAL void discard_intern() {
if (temp && str)
delete str;
}
DLLLOCAL void set_intern(const QoreString* s, const QoreEncoding* qe, ExceptionSink* xsink) {
if (s->getEncoding() != qe) {
str = s->convertEncoding(qe, xsink);
temp = true;
} else {
str = const_cast<QoreString* >(s);
temp = false;
}
}
};
DLLEXPORT size_t qore_get_unicode_character_width(int ucs);
#endif
QCS_DEFAULT
DLLEXPORT const QoreEncoding * QCS_DEFAULT
the default encoding for the Qore library
BinaryNode
holds arbitrary binary data
Definition: BinaryNode.h:41
DateTime
Holds absolute and relative date/time values in Qore with precision to the microsecond.
Definition: DateTime.h:93
ExceptionSink
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
QoreEncoding
defines string encoding functions in Qore
Definition: QoreEncoding.h:83
QoreString
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:93
QoreString::concatEncodeUriRequest
DLLEXPORT int concatEncodeUriRequest(ExceptionSink *xsink, const QoreString &url)
concatenates a URI-encoded version of the c-string passed
QoreString::set
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
QoreString::QoreString
DLLEXPORT QoreString(const QoreEncoding *new_qorecharset)
creates an empty string and assigns the encoding passed
QoreString::splice
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 ...
QoreString::endsWith
DLLEXPORT bool endsWith(const std::string &str) const
returns true if the current string ends with the argument string (bytes)
QoreString::capacity
DLLEXPORT size_t capacity() const
returns number of bytes allocated for the string's buffer, capacity is always >= size
QoreString::concatBase64
DLLEXPORT void concatBase64(const QoreString *str)
concatenates the base64-encoded version of the binary data passed (does not make any character encodi...
QoreString::operator+=
DLLEXPORT QoreString & operator+=(const std::string &str)
concatenates the characters to the string; assumes the string to be concatenated is already in the ch...
QoreString::c_str
DLLEXPORT const char * c_str() const
returns the string's buffer; this data should not be changed
QoreString::trim
DLLEXPORT int trim(ExceptionSink *xsink, const QoreString *chars=nullptr)
removes leading and trailing whitespace or other characters
QoreString::concatAndHTMLDecode
DLLEXPORT void concatAndHTMLDecode(const char *str, size_t slen)
concatenates HTML-decoded version of the c-string passed with the given length
QoreString::reset
DLLEXPORT void reset()
reset string to zero length; memory is deallocated; string encoding is reset to QCS_DEFAULT
QoreString::takeAndTerminate
DLLEXPORT void takeAndTerminate(char *str, size_t size)
takes ownership of the character pointer passed and assigns it to the string (frees memory previously...
QoreString::strlen
DLLEXPORT size_t strlen() const
returns number of bytes in the string (not including the null pointer)
QoreString::copy
DLLEXPORT QoreString * copy() const
returns an exact copy of the string
QoreString::concatUnicode
DLLEXPORT int concatUnicode(unsigned code)
append a character sequence from a unicode code point (returns 0 for OK, -1 for error)
QoreString::concatISO8601DateTime
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...
QoreString::startsWith
DLLEXPORT bool startsWith(const std::string &str) const
returns true if the current string starts with the argument string (bytes)
QoreString::take
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...
QoreString::splice
DLLEXPORT void splice(qore_offset_t offset, ExceptionSink *xsink)
removes characters from the string starting at position "offset"
QoreString::trim_single_leading
DLLEXPORT void trim_single_leading(char c)
remove a single leading character if present
QoreString::operator=
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...
QoreString::concatHex
DLLEXPORT void concatHex(const char *buf, size_t size)
concatenates hexidecimal digits corresponding to the binary data passed up to byte "len"
QoreString::extract
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 ...
QoreString::insertch
DLLEXPORT int insertch(char c, size_t pos, unsigned times)
insert a character at a certain position in the string a number of times
QoreString::trim_leading
DLLEXPORT void trim_leading(const char *chars=0)
remove leading whitespace or other characters
QoreString::operator!=
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:879
QoreString::take
DLLEXPORT void take(char *str)
takes ownership of the character pointer passed and assigns it to the string (frees memory previously...
QoreString::concatBase64
DLLEXPORT void concatBase64(const char *buf, size_t size, size_t maxlinelen)
concatenates the base64-encoded version of the binary data passed and ensures the maximum line length...
QoreString::compare
DLLEXPORT int compare(const QoreString *str) const
compares two strings without converting encodings (if the encodings do not match then "this" is deeme...
QoreString::operator[]
DLLEXPORT int operator[](qore_offset_t pos) const
returns the byte (not character) at the given location; if the location is invalid,...
QoreString::clear
DLLEXPORT void clear()
reset string to zero length; memory is not deallocated; string encoding does not change
QoreString::bindex
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
QoreString::concatEscape
DLLEXPORT void concatEscape(const char *str, char c, char esc_char='\\')
concatenates a string and escapes character c with esc_char
QoreString::concatHex
DLLEXPORT void concatHex(const QoreString *str)
concatenates hexidecimal digits corresponding to the QoreString data passed interpreted as binary dat...
QoreString::giveBuffer
DLLEXPORT char * giveBuffer()
returns the character buffer and leaves the QoreString empty, the caller owns the memory returned (mu...
QoreString::getUnicodePoint
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...
QoreString::equalPartial
DLLEXPORT bool equalPartial(const QoreString &str) const
returns true if the beginning of the current string matches the argument string, false if not,...
QoreString::isDataAscii
DLLEXPORT bool isDataAscii() const
returns true if the string is empty or has no characters with the high bit set (ie all characters < 1...
QoreString::QoreString
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...
QoreString::prepend
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
QoreString::extract
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...
QoreString::equalPartialSoft
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,...
QoreString::index
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
QoreString::concatUTF8FromUnicode
DLLEXPORT void concatUTF8FromUnicode(unsigned code)
append a UTF-8 character sequence from a unicode code point, assumes the string is tagged with QCS_UT...
QoreString::terminate
DLLEXPORT void terminate(size_t size)
terminates the string at byte position "size", the string is reallocated if necessary
QoreString::allocate
DLLEXPORT void allocate(unsigned requested_size)
Ensure the internal buffer has at least expected size in bytes.
QoreString::replaceChar
DLLEXPORT void replaceChar(size_t offset, char c)
replaces a byte with the byte passed
QoreString::trimTrailing
DLLEXPORT int trimTrailing(ExceptionSink *xsink, const QoreString *chars=nullptr)
removes trailing whitespace or other characters
QoreString::parseBase64ToString
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...
QoreString::toBigInt
DLLEXPORT int64 toBigInt() const
returns the value of the string as an int64
QoreString::getCharWidth
DLLEXPORT size_t getCharWidth(ExceptionSink *xsink) const
returns the character width of the string
QoreString::QoreString
DLLEXPORT QoreString(const QoreString &str)
creates a copy of the QoreString argument passed
QoreString::regexSubst
DLLEXPORT QoreString * regexSubst(QoreString &match, QoreString &subst, int opts, ExceptionSink *xsink) const
performs perl5-compatible regular expression substitution
QoreString::regexSubstInPlace
DLLEXPORT int regexSubstInPlace(QoreString &match, QoreString &subst, int opts, ExceptionSink *xsink) const
performs perl5-compatible regular expression substitution to the current string
QoreString::concatAndHTMLEncode
DLLEXPORT void concatAndHTMLEncode(const QoreString *str, ExceptionSink *xsink)
concatenation with HTML special character encoding
QoreString::reserve
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...
QoreString::brindex
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...
QoreString::concat
DLLEXPORT void concat(const QoreString *str, ExceptionSink *xsink)
concatenates a string and converts encodings if necessary
QoreString::regexSubst
DLLEXPORT int regexSubst(QoreString &output, QoreString &match, QoreString &subst, int opts, ExceptionSink *xsink) const
performs perl5-compatible regular expression substitution
QoreString::length
DLLEXPORT size_t length() const
returns the number of characters (not bytes) in the string
QoreString::getBuffer
DLLEXPORT const char * getBuffer() const
returns the string's buffer; this data should not be changed
QoreString::find
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
QoreString::endsWith
DLLEXPORT bool endsWith(const char *str) const
returns true if the current string ends with the argument string (bytes)
QoreString::find
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
QoreString::trim_trailing
DLLEXPORT void trim_trailing(const char *chars=0)
remove trailing whitespace or other characters
QoreString::findAny
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
QoreString::concatEscape
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)
QoreString::operator!=
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:884
QoreString::takeAndTerminate
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...
QoreString::getEncoding
DLLEXPORT const QoreEncoding * getEncoding() const
returns the encoding for the string
QoreString::splice
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 ...
QoreString::equalPartialPath
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...
QoreString::equal
DLLEXPORT bool equal(const char *str) const
returns true if the strings are equal, false if not (encodings are assumed to be equal)
QoreString::QoreString
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 ...
QoreString::concatAndHTMLDecode
DLLEXPORT void concatAndHTMLDecode(const char *str)
concatenates HTML-decoded version of the c-string passed
QoreString::addch
DLLEXPORT void addch(char c, unsigned times)
append a character to the string a number of times
QoreString::getUnicodePointFromBytePos
DLLEXPORT unsigned int getUnicodePointFromBytePos(size_t offset, unsigned &len, ExceptionSink *xsink) const
return Unicode code point for the given byte offset
QoreString::trim_trailing
DLLEXPORT void trim_trailing(char c)
remove trailing characters if present
QoreString::QoreString
DLLEXPORT QoreString(int64 i)
creates a new string with the string representation of the integer passed and assigns the default enc...
QoreString::concatHex
DLLEXPORT void concatHex(const BinaryNode *bin)
concatenates hexidecimal digits corresponding to the binary data passed
QoreString::sprintf
DLLEXPORT int sprintf(const char *fmt,...)
this will concatentate a formatted string to the existing string according to the format string and t...
QoreString::parseBase64
DLLEXPORT BinaryNode * parseBase64(ExceptionSink *xsink) const
parses the current string data as base64-encoded data and returns it as a BinaryNode pointer (caller ...
QoreString::rfindAny
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 ...
QoreString::size
DLLEXPORT size_t size() const
returns number of bytes in the string (not including the null pointer)
QoreString::brindex
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...
QoreString::set
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
QoreString::rindex
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...
QoreString::concatDecodeUriRequest
DLLEXPORT int concatDecodeUriRequest(const QoreString &url, ExceptionSink *xsink)
concatenates a URI-decoded version of the c-string passed
QoreString::set
DLLEXPORT void set(const QoreString &str)
sets the value to the copy of the QoreString passed
QoreString::QoreString
DLLEXPORT QoreString(const char *str, const QoreEncoding *new_qorecharset)
copies the c-string passed and assigns the encoding passed
QoreString::QoreString
DLLEXPORT QoreString(const DateTime *date)
creates a new string from the DateTime value passed in the format YYYYMMDDHHmmSS
QoreString::reverse
DLLEXPORT QoreString * reverse() const
return a Qorestring with the characters reversed
QoreString::startsWith
DLLEXPORT bool startsWith(const char *str) const
returns true if the current string starts with the argument string (bytes)
QoreString::concatEncode
DLLEXPORT int concatEncode(ExceptionSink *xsink, const QoreString &str, unsigned code=CE_XHTML)
concatenates a string and encodes it according to the encoding argument passed
QoreString::QoreString
DLLEXPORT QoreString()
creates an empty string and assigns the default encoding QCS_DEFAULT
QoreString::bindex
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
QoreString::concatAndHTMLDecode
DLLEXPORT void concatAndHTMLDecode(const QoreString *str)
concatenates HTML-decoded version of the c-string passed
QoreString::concatBase64
DLLEXPORT void concatBase64(const BinaryNode *bin)
concatenates the base64-encoded version of the binary data passed
QoreString::trim_single_trailing
DLLEXPORT void trim_single_trailing(char c)
remove a single trailing character if present
QoreString::concatBase64
DLLEXPORT void concatBase64(const QoreString *str, size_t maxlinelen)
concatenates the base64-encoded version of the binary data passed (does not make any character encodi...
QoreString::replace
DLLEXPORT void replace(size_t offset, size_t len, const char *str)
replaces bytes with the string passed
QoreString::trim
DLLEXPORT void trim(char c)
remove leading and trailing characters if present
QoreString::operator=
DLLEXPORT QoreString & operator=(const QoreString &other)
assigns the value of one string to another
QoreString::getByteOffset
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 ...
QoreString::compareSoft
DLLEXPORT int compareSoft(const QoreString *str, ExceptionSink *xsink) const
compares the string with another string, performing character set encoding conversion if necessary
QoreString::equal
DLLEXPORT bool equal(const QoreString &str) const
returns true if the strings are equal, false if not, if the character encodings are different,...
QoreString::set
DLLEXPORT void set(char *nbuf, size_t nlen, size_t nallocated, const QoreEncoding *enc)
takes ownership of the char* passed; discards current state
QoreString::trim_leading
DLLEXPORT void trim_leading(char c)
remove leading characters if present
QoreString::operator=
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...
QoreString::concatDecodeUrl
DLLEXPORT void concatDecodeUrl(const char *url)
concatenates a URL-decoded version of the c-string passed
QoreString::concatBase64
DLLEXPORT void concatBase64(const char *buf, size_t size)
concatenates the base64-encoded version of the binary data passed
QoreString::QoreString
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
QoreString::parseHex
DLLEXPORT BinaryNode * parseHex(ExceptionSink *xsink) const
parses the current string data as hexadecimal-encoded data and returns it as a BinaryNode pointer (ca...
QoreString::concat
DLLEXPORT void concat(const DateTime *d)
concatenates a DateTime value to a string in the format YYYYMMDDHHmmSS
QoreString::chomp
DLLEXPORT size_t chomp()
removes a single \n\r or \n from the end of the string and returns the number of characters removed
QoreString::QoreString
DLLEXPORT QoreString(bool b)
creates a single-character string (either '0' or '1') and assigns the default encoding QCS_DEFAULT
QoreString::rfind
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
QoreString::trim
DLLEXPORT void trim(const char *chars=0)
remove leading and trailing whitespace or other characters
QoreString::convertEncoding
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,...
QoreString::concat
DLLEXPORT void concat(const char *str)
concatenates a c-string to the existing string
QoreString::QoreString
DLLEXPORT QoreString(const QoreString *str)
creates a copy of the QoreString argument passed
QoreString::toupr
DLLEXPORT void toupr()
converts the string to upper-case in place
QoreString::take
DLLEXPORT void take(char *str, size_t size)
takes ownership of the character pointer passed and assigns it to the string (frees memory previously...
QoreString::parseBase64ToString
DLLEXPORT QoreString * parseBase64ToString(ExceptionSink *xsink) const
parses the current string data as base64-encoded data and returns it as a QoreString pointer owned by...
QoreString::operator!=
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:874
QoreString::concat
DLLEXPORT void concat(const QoreString *str, size_t size, ExceptionSink *xsink)
concatenates a QoreString up to character "len"
QoreString::concatDecodeUrl
DLLEXPORT int concatDecodeUrl(const QoreString &url, ExceptionSink *xsink)
concatenates a URL-decoded version of the c-string passed (RFC 3986 compliant: http://tools....
QoreString::QoreString
DLLEXPORT QoreString(const char *str)
copies the c-string passed and assigns the default encoding QCS_DEFAULT
QoreString::rfind
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
QoreString::operator==
DLLEXPORT bool operator==(const QoreString &other) const
returns true if the other string is equal to this string (encodings also must be equal)
QoreString::substr
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...
QoreString::setEncoding
DLLEXPORT void setEncoding(const QoreEncoding *new_encoding)
changes the tagged encoding to the given encoding; does not affect the actual string buffer,...
QoreString::empty
DLLEXPORT bool empty() const
returns true if the string is empty, false if not
QoreString::getUnicodePointFromUTF8
DLLEXPORT unsigned int getUnicodePointFromUTF8(qore_offset_t offset=0) const
return Unicode code point for character offset, string must be UTF-8
QoreString::concat
DLLEXPORT int concat(const QoreString &str, qore_offset_t pos, ExceptionSink *xsink)
concatenates a string and converts encodings if necessary
QoreString::QoreString
DLLEXPORT QoreString(const std::string &str, const QoreEncoding *new_encoding=QCS_DEFAULT)
copies the std::string passed and assigns the encoding passed
QoreString::rfind
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
QoreString::operator==
DLLEXPORT bool operator==(const std::string &other) const
returns true if the other string is equal to this string (encodings also must be equal)
QoreString::concat
DLLEXPORT int concat(const QoreString &str, qore_offset_t pos, qore_offset_t len, ExceptionSink *xsink)
concatenates a string and converts encodings if necessary
QoreString::extract
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...
QoreString::vsprintf
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...
QoreString::compare
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
QoreString::prepend
DLLEXPORT void prepend(const char *str)
prepends the string given to the string, assumes character encoding is the same as the string's
QoreString::insert
DLLEXPORT int insert(const char *str, size_t pos)
inserts a character string at a certain position in the string
QoreString::QoreString
DLLEXPORT QoreString(char *nbuf, size_t nlen, size_t nallocated, const QoreEncoding *enc)
takes ownership of the char* passed
QoreString::concatEncodeUrl
DLLEXPORT int concatEncodeUrl(ExceptionSink *xsink, const QoreString &url, bool encode_all=false)
concatenates a URL-encoded version of the c-string passed
QoreString::bindex
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
QoreString::concatAndHTMLEncode
DLLEXPORT void concatAndHTMLEncode(const char *str)
concatenates HTML-encoded version of the c-string passed
QoreString::concat
DLLEXPORT void concat(const char c)
concatenates a single character to the string
QoreString::isDataPrintableAscii
DLLEXPORT bool isDataPrintableAscii() const
returns true if the string is empty or only contains printable non-control ASCII characters (ie all c...
QoreString::trimLeading
DLLEXPORT int trimLeading(ExceptionSink *xsink, const QoreString *chars=nullptr)
removes leading whitespace or other characters
QoreString::concatDecode
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...
QoreString::set
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
QoreString::set
DLLEXPORT void set(const QoreString *str)
sets the value to the copy of the QoreString passed
QoreString::equalPartial
DLLEXPORT bool equalPartial(const char *str) const
returns true if the beginning of the current string matches the argument string, false if not (encodi...
QoreString::concatBase64
DLLEXPORT void concatBase64(const BinaryNode *bin, size_t maxlinelen)
concatenates the base64-encoded version of the binary data passed and ensures the maximum line length...
QoreString::priv
struct qore_string_private * priv
the private implementation of QoreString
Definition: QoreString.h:1006
QoreString::replaceAll
DLLEXPORT void replaceAll(const char *old_str, const char *new_str)
replaces all occurences of the first string with the second string
QoreString::brindex
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...
QoreString::concat
DLLEXPORT void concat(const std::string &str)
concatenates an stl string to the existing string
QoreString::splice
DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, ExceptionSink *xsink)
removes "length" characters from the string starting at position "offset"
QoreString::QoreString
DLLEXPORT QoreString(const BinaryNode *bin)
creates a new string as the base64-encoded value of the binary object passed
QoreString::QoreString
DLLEXPORT QoreString(char c)
creates a single-character string from the argument and assigns the default encoding QCS_DEFAULT
QoreString::substr
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...
QoreString::take
DLLEXPORT void take(char *str, const QoreEncoding *enc)
takes ownership of the character pointer passed and assigns it to the string (frees memory previously...
QoreString::concat
DLLEXPORT void concat(const char *str, size_t size)
concatenates a c-string to the existing string, up to byte "size"
QoreString::find
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
QoreString::concatUnicode
DLLEXPORT int concatUnicode(unsigned code, ExceptionSink *xsink)
append a character sequence from a unicode code point (returns 0 for OK, -1 for exception)
QoreString::replace
DLLEXPORT void replace(size_t offset, size_t len, const QoreString *str, ExceptionSink *xsink)
replaces bytes with the string passed
QoreString::operator+=
DLLEXPORT QoreString & operator+=(const char *str)
concatenates the characters to the string; assumes the string to be concatenated is already in the ch...
QoreString::equalSoft
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,...
QoreString::tolwr
DLLEXPORT void tolwr()
converts the string to lower-case in place
QoreString::operator==
DLLEXPORT bool operator==(const char *other) const
returns true if the other string is equal to this string (encodings also must be equal)
QoreString::QoreString
DLLEXPORT QoreString(double f)
creates a new string with the string representation of the floating-point value passed and assigns th...
QoreString::~QoreString
DLLEXPORT ~QoreString()
frees any memory allocated by the string
TempEncodingHelper
use this class to manage strings where the character encoding must be specified and may be different ...
Definition: QoreString.h:1104
TempEncodingHelper::TempEncodingHelper
DLLLOCAL TempEncodingHelper(const QoreString *s, const QoreEncoding *qe, ExceptionSink *xsink)
converts the given string to the required encoding if necessary
Definition: QoreString.h:1122
TempEncodingHelper::~TempEncodingHelper
DLLLOCAL ~TempEncodingHelper()
deletes any temporary string being managed by the object
Definition: QoreString.h:1131
TempEncodingHelper::removeBom
DLLEXPORT void removeBom()
remove any leading byte order marker (BOM) from UTF-16* strings
TempEncodingHelper::giveBuffer
DLLLOCAL char * giveBuffer()
returns a char pointer of the string, the caller owns the pointer returned (it must be manually freed...
Definition: QoreString.h:1181
TempEncodingHelper::TempEncodingHelper
DLLLOCAL TempEncodingHelper()
creates an empty TempEncodingHelperObject that may be initialized with TempEncodingHelper::set() late...
Definition: QoreString.h:1127
TempEncodingHelper::makeTemp
DLLLOCAL void makeTemp()
ensures that the object is holding a temporary value
Definition: QoreString.h:1158
TempEncodingHelper::operator*
DLLLOCAL const QoreString * operator*()
returns the string being managed
Definition: QoreString.h:1169
TempEncodingHelper::set
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:1145
TempEncodingHelper::TempEncodingHelper
DLLLOCAL TempEncodingHelper(const QoreString &s, const QoreEncoding *qe, ExceptionSink *xsink)
converts the given string to the required encoding if necessary
Definition: QoreString.h:1112
TempEncodingHelper::operator->
DLLLOCAL const QoreString * operator->()
returns the string being managed
Definition: QoreString.h:1166
TempEncodingHelper::is_temp
DLLLOCAL bool is_temp() const
returns true if a temporary string is being managed
Definition: QoreString.h:1153
TempString
class used to hold a possibly temporary QoreString pointer, stack only, cannot be dynamically allocat...
Definition: QoreString.h:1045
TempString::operator->
DLLLOCAL QoreString * operator->()
returns the QoreString pointer being managed
Definition: QoreString.h:1066
TempString::TempString
DLLLOCAL TempString()
populates the object with a new QoreString that this object will manage
Definition: QoreString.h:1048
TempString::operator*
DLLLOCAL QoreString * operator*()
returns the QoreString pointer being managed
Definition: QoreString.h:1069
TempString::TempString
DLLLOCAL TempString(const QoreEncoding *enc)
populates the object with a new QoreString in a specific encoding that this object will manage
Definition: QoreString.h:1052
TempString::release
DLLLOCAL QoreString * release()
releases the QoreString pointer being managed and sets the internal pointer to 0
Definition: QoreString.h:1075
TempString::TempString
DLLLOCAL TempString(QoreString *s)
populates the object with the QoreString pointer to be managed
Definition: QoreString.h:1056
TempString::~TempString
DLLLOCAL ~TempString()
deletes the QoreString pointer being managed
Definition: QoreString.h:1061
qore_offset_t
intptr_t qore_offset_t
used for offsets that could be negative
Definition: common.h:76
int64
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
QoreValue
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:276