Added substring capability to ZString.
This commit is contained in:
1 parent
36348aba17
commit
d0d5172afa
5 files changed
+69
-6
No files matched your search
@@ -42,7 +42,7 @@ namespace coreutils {
|
||||
ZString();
|
||||
|
||||
///
|
||||
///
|
||||
/// Constructor wrapping a null terminated buffer to a ZString.
|
||||
///
|
||||
|
||||
ZString(const char *data);
|
||||
@@ -53,6 +53,10 @@ namespace coreutils {
|
||||
|
||||
ZString(char *data, size_t length);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
ZString(const char *data, size_t length);
|
||||
|
||||
///
|
||||
@@ -74,8 +78,8 @@ namespace coreutils {
|
||||
~ZString();
|
||||
|
||||
///
|
||||
/// A friend method used to write the value of the ZString from the cursor
|
||||
/// point to an ostream using the << syntax.
|
||||
/// A friend method used to write the value of the ZString
|
||||
/// to an ostream using the << syntax.
|
||||
///
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const ZString& zstring);
|
||||
@@ -83,9 +87,19 @@ namespace coreutils {
|
||||
friend std::ostream& operator+(std::ostream& os, const ZString& zstring);
|
||||
friend std::ostream& operator+(std::ostream& os, const char *value);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
bool operator<(const ZString &valuex) const;
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
bool operator>(const ZString &valuex) const;
|
||||
bool operator==(const ZString &valuex) const;
|
||||
bool operator==(const char *valuex) const;
|
||||
bool operator!=(const ZString &valuex) const;
|
||||
bool operator!=(const char *valuex) const;
|
||||
|
||||
@@ -146,6 +160,18 @@ namespace coreutils {
|
||||
///
|
||||
///
|
||||
|
||||
ZString substring(int start);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
ZString substring(int start, int len);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
std::vector<ZString> &split(ZString &delimiter, size_t maxSize = 0);
|
||||
|
||||
///
|
||||
@@ -168,6 +194,10 @@ namespace coreutils {
|
||||
|
||||
ZString getTokenExclude(const char *exclude);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
ZString getTokenExclude(std::string exclude);
|
||||
|
||||
///
|
||||
@@ -219,8 +249,16 @@ namespace coreutils {
|
||||
|
||||
bool ifNext(const char *value);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
bool ifNext(ZString &value);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
int ifEqualsCount(ZString &comparator);
|
||||
|
||||
///
|
||||
@@ -255,6 +293,10 @@ namespace coreutils {
|
||||
|
||||
char* getCursor();
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
void setCursor(char *cursor);
|
||||
|
||||
///
|
||||
|
||||
Reference in new issue
Block a user