This c++20 library contains multiple useful functions, most of them are focused on working with strings. Documentation is available here.
Please report bugs on the github page!
- Extensive logger using variadic templates to log almost anything
- Some containers like a thread safe queue and a ringbuffer
- Regex that works with std::string_view
- Type conversion utility (from string to int/float/uint/bool)
- Settings manager which can store settings of different types and load/save them from/to a file
- Python script that generates an array of strings for your enumerations, so that you can get the name of an enum value
- Download PKGBUILD:
wget https://raw.github.com/MatthiasQuintern/gz-cpp-util/main/PKGBUILD
- Build and install with the Arch Build System:
makepkg -si
- Make a clone of this repo:
git clone https://github.com/MatthiasQuintern/gz-cpp-util
- Build and install:
cd src && make && make DESTDIR=/usr/local install
I do not delevop on windows, but you'll figure it out. The library does not contain platform specific code and should compile with mvsc.
The documentation is for this library is available here, but it can also be generated using doxygen.
cd gz-cpp-util/src
make docs
firefox ../docs/html/index.html
Replace firefox
with your web browser
- Add
-lgzutil
to your linker flags - Include the wanted header:
#include <gz-util/*dir*/*header.hpp*>
- The name of the library is
gz-util
and notgz-cpp-util
like the git repo!
- The gen_enum_str.py script will be installed to
/usr/(local)/bin/gz-enum-str
. - Run
gz-enum-str -h
to list available options.
- String conversion utility now split in to_string.hpp, from_string.hpp and conversion.hpp
- Containers with types that have a toString overload can be converted to string
- Improved the documentation
- Removed
util
directory
- Added toString support for 2D and 3D extent types
- Added readBinaryFile function
- Added toHex/Oct/BinString for forward ranges
- Added integer to string in hex/oct/bin representation conversion
- Added integer from string in hex/oct/bin representation conversion
- Changes to logger (log.hpp):
- Added create info struct constructor
- Timestamp can be disabled and colored
- Added different log levels that can be turned off/on at compile time
- Added SettingsManager
- Renamed getXXX to getXXXOr
- Added more type conversion utility
- fromString()
- toString()
- Logger now uses to_string
- Restructured files
- Added more documentation
- Moved math part to its own repository/library here
- Added matrices to math lib
- Improved logger
- initial version