ignore string_tests.
This commit is contained in:
commit
6409bd2444
@ -232,7 +232,7 @@ namespace coreutils {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MString &MString::write(ZString &value) {
|
||||
MString &MString::write(ZString value) {
|
||||
int len = length;
|
||||
setSize(length + value.getLength());
|
||||
memcpy(data + len, value.getData(), value.getLength());
|
||||
|
@ -212,7 +212,7 @@ namespace coreutils {
|
||||
///
|
||||
///
|
||||
|
||||
MString &write(ZString &value);
|
||||
MString &write(ZString value);
|
||||
|
||||
///
|
||||
/// Read data from a socket and store in MString.
|
||||
|
17
ZString.cpp
17
ZString.cpp
@ -250,6 +250,10 @@ namespace coreutils {
|
||||
return strncmp(cursor, value, strlen(value)) == 0;
|
||||
}
|
||||
|
||||
int ZString::compare(ZString zstring) {
|
||||
|
||||
}
|
||||
|
||||
bool ZString::equals(const char *value) {
|
||||
if (strlen(value) != length)
|
||||
return false;
|
||||
@ -311,6 +315,19 @@ namespace coreutils {
|
||||
return len;
|
||||
}
|
||||
|
||||
bool ZString::lineIsWhitespace() {
|
||||
char *end = data + length;
|
||||
char *temp = cursor;
|
||||
while(temp < end) {
|
||||
if(*temp == '\n')
|
||||
return true;
|
||||
if((*temp != ' ') && (*temp != '\t'))
|
||||
return false;
|
||||
++temp;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
ZString ZString::goeol() {
|
||||
bool set = false;
|
||||
char *temp = cursor;
|
||||
|
12
ZString.h
12
ZString.h
@ -243,6 +243,12 @@ namespace coreutils {
|
||||
///
|
||||
|
||||
bool startsWith(const char *value);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
int compare(ZString zstring);
|
||||
|
||||
///
|
||||
///
|
||||
@ -293,6 +299,12 @@ namespace coreutils {
|
||||
///
|
||||
|
||||
int skipWhitespace();
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
bool lineIsWhitespace();
|
||||
|
||||
///
|
||||
///
|
||||
|
@ -1,49 +0,0 @@
|
||||
# Install script for directory: /home/bradarant/barant/CoreUtils
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install shared libraries without execute permission?
|
||||
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||
set(CMAKE_INSTALL_SO_NO_EXE "1")
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
if(CMAKE_INSTALL_COMPONENT)
|
||||
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
|
||||
else()
|
||||
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
file(WRITE "/home/bradarant/barant/CoreUtils/${CMAKE_INSTALL_MANIFEST}"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -63,5 +63,12 @@ int main(int argc, char **argv) {
|
||||
coreutils::ZString test5 = "this is a test of the Exclude tokenization without\n a line end.";
|
||||
coreutils::ZString test6 = test5.getTokenExclude("\n");
|
||||
std::cout << test6 << std::endl;
|
||||
|
||||
coreutils::ZString test7 = "this is a line\n \nthis is another line\n ";
|
||||
std::cout << test7.lineIsWhitespace() << test7.goeol() << std::endl;
|
||||
std::cout << test7.lineIsWhitespace() << test7.goeol() << std::endl;
|
||||
std::cout << test7.lineIsWhitespace() << test7.goeol() << std::endl;
|
||||
std::cout << test7.lineIsWhitespace() << test7.goeol() << std::endl;
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user