Instantly share code, notes, and snippets.

Embed
What would you like to do?
Legibilidade com C++14 - get_numeric
template<typename T>
T get_numeric(const T &input)
{
T output;
std::copy_if(begin(input), end(input), std::back_inserter(output), [](auto c) {
return ( c >= '0' && c <= '9' );
});
return output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment