Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Unformat, which parses formatted strings (reverse of std::format) #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adamyaxley
Copy link
Contributor

Link: https://github.com/adamyaxley/Unformat

Extract from README:

Parsing and extraction of original data from brace style "{}" formatted strings. It basically unformats what you thought was formatted for good.

Unformat is simple to use and works on all basic types. See the below example for extracting a std::string and an 'int'

std::string name;
int age;
unformat("Harry is 18 years old.", "{} is {} years old.", name, age);
// name == "Harry" and age == 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant