Contents
Vector utilities

Overview

This header provides user friendly utility functions, defined within the Balau::Util::Vectors namespace.

Quick start

#include <Balau/Util/Vectors.hpp>

The following utilities are currently implemented. More information is available on the API documentation page.

Appending

Function name Description
append Appends the source vector to the destination vector.
pushBack Populate an existing vector via emplace back of multiple elements.

The pushBack function allows variadic emplace back to be performed in a single function.

Conversion

These functions convert vectors of characters to strings and strings to vectors of characters.

Function name Description
charsToString Convert the characters in the supplied char/char16_t/chare32_t vector to a UTF-8/UTF-16/UTF-32 string.
toCharVector Convert the supplied UTF-8/UTF-32 string to a char/char32_t vector.
toStringVector Convert the supplied vector to a vector of UTF-8 strings, by calling toString on each object.
toString32Vector Convert the supplied vector to a vector of UTF-32 strings, by calling toString32 on each object.