Easy to use, header only C++ 11 std::string utility library.
Any constructive comments and improvements to this little library are very welcome.
- Generic parsing methods - from std::string and to std::string.
- Splitting std::string to tokens with user defined delimiter (useful for CSV parsing).
- Replace a substring with another substring.
- Text manipulation functions: repeat (char or std::string), to_lower, to_upper, trim (also in-place).
- Checks: contains, starts_with, ends_with, matches.
- Compare two std::string with their case ignored.
- Header only library - no building required.
- Does not require any dependencies.
Online documentation can be found here.
Simply put strutil.h in your include directory. Then, in C++ file include it:
#include <strutil.h>
See tests/test_cases.cpp file for example usage.
strutil supports Google Test library (link).
To build testing environment execute the following CMake commands:
mkdir build
cd build
cmake ..
- SomeRandomDev49
- flying-tiger
- zhongjingjogy