Reject negative unsigned string values
This commit is contained in:
1 parent
22efea8ecd
commit
39d4b41e2b
3 files changed
+15
-4
No files matched your search
@@ -14,7 +14,8 @@ to_bool
|
||||
int_val
|
||||
|
||||
:content
|
||||
Parses a trimmed string as a base-10 unsigned integer.
|
||||
Parses a trimmed string as a base-10 unsigned integer. An optional leading `+`
|
||||
is accepted. Negative and overflowing values return the fallback.
|
||||
|
||||
Unlike `int_val()`, the whole trimmed string must be consumed by the parser. Empty strings and partially parsed values such as `"42px"` return the fallback.
|
||||
|
||||
|
||||
Reference in new issue
Block a user