Skip to content

robertshepherdcpp/format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

format

A simple formatting library.

Some examples of use are the following. Bear in mind all the functionality is in the format namespace. Also to include use:

#include<https://raw.githubusercontent.com/robertshepherdcpp/format/main/format.cpp>

Here is the first basic usage.

format::format("Hello, you are {} years old", 42);

Which outputs:

Hello, you are 42 years old

You do not have to use additional variables, you can just pass things to print and it will print them:

format::format("Hello");

You can pass as many arguements as you want:

format::format("Hello {} you are {} years old. You live on planet {} which is in the {}.", "Robert", 42, "Earth", "Milky Way");

Which has the following output:

Hello Robert you are 42 years old. You live on planet Earth which is in the Milk Way.

About

A simple formatting library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages