-
Notifications
You must be signed in to change notification settings - Fork 12
ST::conversion_result
Michael Hansen edited this page Jan 6, 2018
·
2 revisions
#include <string_theory/string>
Name | Summary |
---|---|
(constructor) | Constructor for conversion_result |
ok | Return whether the conversion was successful |
full_match | Return whether the conversion matched the entire string |
The ST::conversion_result
type stores the result of a conversion operation.
Specifically, this is used by the ST::string numeric conversion
functions, in the variants that can report their result.
Signature |
---|
explicit conversion_result() noexcept |
Default constructor. This will construct a result that has neither the ok nor the full_match status set.
Signature |
---|
bool full_match() const noexcept |
Returns true
if the entire string was matched. This may be true if the
whole string was a valid number (in which case ok() will also be true
),
or if the input string was empty (in which case ok() will be false
).
Signature |
---|
bool ok() const noexcept |
Returns true
if the conversion was successful. More specifically, this is
true
if the conversion found one or more characters to convert from the
beginning of the string.