26 lines
674 B
C++
26 lines
674 B
C++
#include <iostream>
|
|
#include "../ZString.h"
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
// Test comparison operations.
|
|
|
|
coreutils::ZString test1("");
|
|
std::cout << (test1 != ".");
|
|
|
|
// Test split operations.
|
|
|
|
coreutils::ZString test("11111:22222:33333:44444");
|
|
std::cout << "test pre-split: [" << test << "]." << std::endl;
|
|
|
|
test.split(":", 1);
|
|
|
|
std::cout << "test post-split: [" << test << "]." << std::endl;
|
|
std::cout << "test sections: [" << test.getList().size() << "]." << std::endl;
|
|
std::cout << test.getLength() << std::endl;
|
|
|
|
for(int ix = 0; ix < test.getList().size(); ++ix)
|
|
std::cout << ix << ":" << test[ix] << std::endl;
|
|
|
|
}
|