|
guts
|
The gutilities module provides a suite of small, dependency-light helpers grouped under the gutilities namespace. These utilities are reused across the codebase to keep common operations (string normalization, filesystem probing, numeric parsing) consistent and easy to audit.
The guiding design goals are:
The gutilities namespace includes (non-exhaustive):
std::string variant and a std::string_view variant."<number>*<unit>" and converts to internal units when recognized.The module follows conventions defined in gutsConventions.h :
FATALERRORL and GWARNING provide standardized fatal/warning prefixes.FRED("...") or BOLD("...") for colored/bold console output.POINTITEM, CIRCLEITEM, SQUAREITEM, etc., to keep console logs consistent.The example program examples/string_vector_from_string.cc demonstrates how to use getStringVectorFromString() to split a single command-line argument into tokens and print them.
Example output:
Additional utility functions include:
This module is maintained as part of the broader codebase by the primary project maintainer. When updating these utilities, prefer: