You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stringtoolbox - a simple header-only, single-file string toolbox library for C++
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).
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 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", ',');
Dependencies
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)
Projects using stringtoolbox
If your project is using stringtoolbox, just let us know :-)