Function utils::splitOnChar

Function Documentation

inline auto utils::splitOnChar(const std::string &str, const char delim) -> std::vector<std::string>

Split a string on every occurrence of a delimiter character.

Parameters:
  • str – The string to split

  • delim – The delimiter character

Returns:

str split on delim, keeping empty tokens (e.g. “a..b” splits to {“a”, “”, “b”}) rather than collapsing them, so a malformed input with an extra or missing delimiter fails to match the expected token count downstream instead of silently merging fields