STRPARSE.md: sync with recent changes
New functions and Curl_str_number() changed number return type. Closes #16365
This commit is contained in:
parent
bc6a404061
commit
bd15d8beb3
@ -94,11 +94,32 @@ Advance over a single ASCII space. Return non-zero on error.
|
||||
## `Curl_str_number`
|
||||
|
||||
~~~c
|
||||
int Curl_str_number(char **linep, size_t *nump, size_t max);
|
||||
int Curl_str_number(char **linep, curl_size_t *nump, size_t max);
|
||||
~~~
|
||||
|
||||
Get an unsigned decimal number. Leading zeroes are just swallowed. Return
|
||||
non-zero on error.
|
||||
Get an unsigned decimal number not larger than `max`. Leading zeroes are just
|
||||
swallowed. Return non-zero on error. Returns error if there was not a single
|
||||
digit.
|
||||
|
||||
## `Curl_str_hex`
|
||||
|
||||
~~~c
|
||||
int Curl_str_hex(char **linep, curl_size_t *nump, size_t max);
|
||||
~~~
|
||||
|
||||
Get an unsigned hexadecimal number not larger than `max`. Leading zeroes are
|
||||
just swallowed. Return non-zero on error. Returns error if there was not a
|
||||
single digit. Does *not* handled `0x` prefix.
|
||||
|
||||
## `Curl_str_octal`
|
||||
|
||||
~~~c
|
||||
int Curl_str_octal(char **linep, curl_size_t *nump, size_t max);
|
||||
~~~
|
||||
|
||||
Get an unsigned octal number not larger than `max`. Leading zeroes are just
|
||||
swallowed. Return non-zero on error. Returns error if there was not a single
|
||||
digit.
|
||||
|
||||
## `Curl_str_newline`
|
||||
|
||||
@ -107,3 +128,21 @@ int Curl_str_newline(char **linep);
|
||||
~~~
|
||||
|
||||
Check for a single CR or LF. Return non-zero on error */
|
||||
|
||||
## `Curl_str_casecompare`
|
||||
|
||||
~~~c
|
||||
int Curl_str_casecompare(struct Curl_str *str, const char *check);
|
||||
~~~
|
||||
|
||||
Returns true if the provided string in the `str` argument matches the `check`
|
||||
string case insensitively.
|
||||
|
||||
## `Curl_str_nudge`
|
||||
|
||||
~~~c
|
||||
int Curl_str_nudge(struct Curl_str *str, size_t num);
|
||||
~~~
|
||||
|
||||
Removes `num` bytes from the beginning (left) of the string kept in `str`. If
|
||||
`num` is larger than the string, it instead returns an error.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user