stringtoolbox is a small and efficient library written in modern C++ library to provide some features for processing std::strings
.
stringtoolbox is available as single-file, header-only library - just drop stringtoolbox.hpp into your project, #include "stringtoolbox.hpp"
, and compile your project with a modern C++ compiler (C++11 or newer).
- Written in highly portable and high quality C++11
- Available as header-only, single-file distribution - just drop stringtoolbox.hpp into your project,
#include "stringtoolbox.hpp"
, and compile your project with a modern C++ compiler (C++11 or newer) - Remove leading whitespace characters:
std::string retVal = stringtoolbox::ltrim(" Hello World!");
- Remove trailing whitespace characters:
std::string retVal = stringtoolbox::rtrim("Hello World! ");
- Remove leading and trailing whitespace characters:
std::string retVal = stringtoolbox::trim(" Hello World! ");
- Replace all occurrences of given character:
std::string retVal = stringtoolbox::replaceAll("Hello World.", '.', '!');
- Split a string using the given delimiter:
std::vector<std::string> retVal = stringtoolbox::split("Hello,World", ',');
No dependencies! All you need is a C++11-compliant compiler (we are testing with GCC 4.8.4 and MSVC 19.0.24215.1) as the project ships the following dependencies as part of the source distribution:
stringtoolbox is provided as header-only, single-file library as well - just drop stringtoolbox.hpp into your project, #include "stringtoolbox.hpp"
, and compile your project with a modern C++ compiler (C++11 or newer)
If your project is using stringtoolbox, just let us know :-)
We are happy to receive your PRs to accelerate libcluon's development; before contributing, please take a look at the Contribution Documents.