A header library for C++ utilities (string manipulation, text file parsing, etc.) – README.org


cesbio-utils is a header-only C++ library with small utilities for:

  • string manipulation (cbutils::string),
  • file IO (cbutils::file),
  • sequence manipulation (cbutils::seq),
  • etc.

which can be useful for rapid prototyping and scripting in C++.

The library is not optimised for speed or memory, but rather for writing simple code. For instance, std::vector is used as a return value instead of passing std::vector& as an output parameter. Although move semantics in modern C++ should suppress the copy of the return value, some programmers will see that as a heresy.

We prefer being able to write

auto lines = cbutils::seq::tail(cbutils::file::readlines(input_file));

rather than

std::vector<std::string> lines{};
cbutils::file::readlines(input_file, lines);
std::vector<std::string> lines_without_first_line{};
cbutils::seq::tail(lines, lines_without_first_line);