Ocular Engine
Ocular::Utils::StringComposer Class Reference

#include <StringComposer.hpp>

Public Member Functions

template<typename T , typename... U>
std::string compose (T first, U...args)
 

Detailed Description

Builds a string from a collection of parameters.

Example:

StringComposer("This ", "has ", 4, " parts.");
-> "This has 4 parts."

Though in a lot of ways similar to a std::stringstream (which the composer is built on-top of), it has the benefit of being able to be utilized in-line.

Example:

Foo* foo = new Foo(STRING_COMPOSER(msgA, msgB, msgC));

The documentation for this class was generated from the following file: