Added ability for ifNextInclude and changed data type on isCaracter to ZString.
This commit is contained in:
1 parent
3eb1f5954a
commit
f1337c682a
2 files changed
+18
-5
No files matched your search
+10
-4
@@ -268,15 +268,21 @@ namespace coreutils {
|
||||
return list;
|
||||
}
|
||||
|
||||
bool ZString::isCharacter(char ch, const char *string) {
|
||||
int len = strlen(string);
|
||||
for (int ix = 0; ix < len; ++ix) {
|
||||
if (ch == string[ix])
|
||||
bool ZString::isCharacter(char ch, ZString include) {
|
||||
for (int ix = 0; ix < include.getLength(); ++ix) {
|
||||
if (ch == include.charAt(ix))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ZString::ifNextInclude(ZString include) {
|
||||
if((cursor <= (data + length)) && isCharacter(*cursor, include))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
ZString ZString::getTokenInclude(const char *include) {
|
||||
char *start = cursor;
|
||||
while ((cursor <= (data + length)) && isCharacter(*cursor, include))
|
||||
|
||||
Reference in new issue
Block a user