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

Feature request: Simple way to consider remaining input a failure #65

Closed
andersjel opened this issue May 21, 2022 · 1 comment
Closed

Comments

@andersjel
Copy link

andersjel commented May 21, 2022

I often need to scan a string and check that the entire string was consumed. I can do:

int num;
auto result = scn::scan(filename, "item-{}.txt", num);
if (result && result.range().empty()) {
    // Filename is valid
}

but I would rather type something like:

int num;
if (scn::scan_all(filename, "item-{}.txt", num)) {
    // Filename is valid
}

Could this be considered (or is there some other simple way to do this that I am missing)?

@eliaskosunen
Copy link
Owner

At least for now, I don't consider this worth increasing the API surface.

@eliaskosunen eliaskosunen closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
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

No branches or pull requests

2 participants