upipe/ustring.h header reference
Upipe sub string manipulation More
Header inclusion
Members
Types
- struct ustring
- struct ustring_byte
- struct ustring_digit
- struct ustring_hexdigit
- struct ustring_size
- struct ustring_time
- struct ustring_uint64
Functions
- int ustring_casecmp(const struct ustring sub1, const struct ustring sub2)
- int ustring_casecmp_str(const struct ustring sub, const char *str)
- bool ustring_casematch(const struct ustring sub, const struct ustring prefix)
- bool ustring_casematch_sfx(const struct ustring sub, const struct ustring suffix)
- int ustring_cmp(const struct ustring sub1, const struct ustring sub2)
- int ustring_cmp_str(const struct ustring sub, const char *str)
- int ustring_cpy(const struct ustring sub, char *buffer, size_t len)
- struct ustring ustring_from_str(const char *str)
- bool ustring_is_empty(const struct ustring sub)
- bool ustring_is_null(const struct ustring sub)
- bool ustring_match(const struct ustring sub, const struct ustring prefix)
- bool ustring_match_sfx(const struct ustring sub, const struct ustring suffix)
- bool ustring_match_str(const struct ustring sub, const char *prefix)
- int ustring_ncasecmp(const struct ustring sub1, const struct ustring sub2, size_t len)
- int ustring_ncmp(const struct ustring sub1, const struct ustring sub2, size_t len)
- struct ustring ustring_null(void )
- struct ustring ustring_shift(const struct ustring sub, size_t offset)
- struct ustring ustring_shift_truncate_until(const struct ustring sub, const char *set)
- struct ustring ustring_shift_truncate_while(const struct ustring sub, const char *set)
- struct ustring ustring_shift_until(const struct ustring sub, const char *set)
- struct ustring ustring_shift_while(const struct ustring sub, const char *set)
- struct ustring ustring_split_casematch(struct ustring *sub, const struct ustring prefix)
- struct ustring ustring_split_casematch_str(struct ustring *sub, const char *prefix)
- struct ustring ustring_split_match(struct ustring *sub, const struct ustring prefix)
- struct ustring ustring_split_match_str(struct ustring *sub, const char *prefix)
- struct ustring ustring_split_sep(struct ustring *sub, const char *separators)
- struct ustring ustring_split_until(struct ustring *sub, const char *set)
- struct ustring ustring_split_while(struct ustring *sub, const char *set)
- struct ustring ustring_sub(struct ustring sub, size_t offset, size_t length)
- struct ustring_byte ustring_to_byte(const struct ustring str)
- struct ustring_digit ustring_to_digit(const struct ustring str)
- struct ustring_hexdigit ustring_to_hexdigit(const struct ustring str)
- struct ustring_size ustring_to_size(const struct ustring str)
- int ustring_to_str(const struct ustring sub, char **str_p)
- struct ustring_time ustring_to_time(const struct ustring str)
- struct ustring_time ustring_to_time_str(const char *str)
- struct ustring_uint64 ustring_to_uint64(const struct ustring str, int base)
- struct ustring_uint64 ustring_to_uint64_str(const char *str, int base)
- struct ustring ustring_truncate(const struct ustring sub, size_t length)
- struct ustring ustring_truncate_until(const struct ustring sub, const char *set)
- struct ustring ustring_truncate_while(const struct ustring sub, const char *set)
- struct ustring ustring_unframe(const struct ustring ustring, char c)
- struct ustring ustring_until(const struct ustring sub, const char *set)
- struct ustring ustring_until_reverse(const struct ustring sub, const char *set)
- struct ustring ustring_while(const struct ustring sub, const char *set)
- struct ustring ustring_while_reverse(const struct ustring sub, const char *set)
Description
Upipe sub string manipulation
Members detail
This macro is declared in upipe/ustring.h source file, line 50.
This macro is declared in upipe/ustring.h source file, line 42.
This macro is declared in upipe/ustring.h source file, line 46.
This macro is declared in upipe/ustring.h source file, line 51.
This macro is declared in upipe/ustring.h source file, line 52.
This macro is declared in upipe/ustring.h source file, line 31.
This struct is declared in upipe/ustring.h source file, line 56.
This struct stores a portion of a string.
This struct is declared in upipe/ustring.h source file, line 710.
This struct stores a parsed byte.
This function is declared in upipe/ustring.h source file, line 411.
This function compares two ustrings ignoring the case.
Parameter list:
- sub1: the first ustring to compare
- sub2: the second ustring to compare
The return value is an integer less than, equal to, or greater than zero if sub1, respectively, to be less than, to match, or to be grearter than sub2
int ustring_casecmp_str(const struct ustring sub, const char *str)
This function is declared in upipe/ustring.h source file, line 426.
This function compares an ustring an a string ignoring the case.
Parameter list:
- sub: the ustring to compare
- str: the string to compare
The return value is an integer less than, equal to, or greater than zero if sub, respectively, to be less than, to match, or to be grearter than str
This function is declared in upipe/ustring.h source file, line 464.
This function returns true if the ustring sub start with ustring prefix ignoring the case.
Parameter list:
- sub: the ustring to test
- prefix: the prefix to match
The return value is a boolean
This function is declared in upipe/ustring.h source file, line 490.
This function returns true if the ustring sub end with ustring suffix ignoring the case.
Parameter list:
- sub: the ustring to test
- suffix: the suffix to match
The return value is a boolean
This function is declared in upipe/ustring.h source file, line 383.
This function compares two ustrings.
Parameter list:
- sub1: the first ustring to compare
- sub2: the second ustring to compare
The return value is an integer less than, equal to, or greater than zero if sub1, respectively, to be less than, to match, or to be grearter than sub2
int ustring_cmp_str(const struct ustring sub, const char *str)
This function is declared in upipe/ustring.h source file, line 398.
This function compares an ustring an a string.
Parameter list:
- sub: the ustring to compare
- str: the string to compare
The return value is an integer less than, equal to, or greater than zero if sub, respectively, to be less than, to match, or to be grearter than str
int ustring_cpy(const struct ustring sub, char *buffer, size_t len)
This function is declared in upipe/ustring.h source file, line 139.
This function copies an ustring to a buffer.
Parameter list:
- sub: an ustring
- buffer: the destination buffer
- len: the size of the buffer
The return value is an error code
This struct is declared in upipe/ustring.h source file, line 656.
This struct stores a parsed digit.
struct ustring ustring_from_str(const char *str)
This function is declared in upipe/ustring.h source file, line 81.
This function makes an ustring from a string.
Parameter list:
- str: the string
The return value is an initialized ustring structure
This struct is declared in upipe/ustring.h source file, line 679.
This struct stores a parsed hexadecimal digit.
bool ustring_is_empty(const struct ustring sub)
This function is declared in upipe/ustring.h source file, line 104.
This function returns true is the ustring is null or empty.
Parameter list:
- sub: an ustring
The return value is true if the ustring is null or empty
bool ustring_is_null(const struct ustring sub)
This function is declared in upipe/ustring.h source file, line 94.
This function returns true is the ustring is null.
Parameter list:
- sub: an ustring
The return value is true if the ustring is null.
This function is declared in upipe/ustring.h source file, line 438.
This function returns true if the ustring sub start with ustring prefix.
Parameter list:
- sub: the ustring to test
- prefix: the prefix to match
The return value is a boolean
This function is declared in upipe/ustring.h source file, line 476.
This function returns true if the ustring sub end with ustring suffix.
Parameter list:
- sub: the ustring to test
- suffix: the suffix to match
The return value is a boolean
bool ustring_match_str(const struct ustring sub, const char *prefix)
This function is declared in upipe/ustring.h source file, line 450.
This function returns true if the ustring sub start with ustring prefix.
Parameter list:
- sub: the ustring to test
- prefix: the prefix to match
The return value is a boolean
This function is declared in upipe/ustring.h source file, line 365.
This function compares at most len characters from two ustrings ignoring the case.
Parameter list:
- sub1: the first ustring to compare
- sub2: the second ustring to compare
The return value is an integer less than, equal to, or greater than zero if the first len bytes of sub1, respectively, to be less than, to match, or to be grearter than the first len bytes of sub2
This function is declared in upipe/ustring.h source file, line 344.
This function compares at most len characters from two ustrings.
Parameter list:
- sub1: the first ustring to compare
- sub2: the second ustring to compare
The return value is an integer less than, equal to, or greater than zero if the first len bytes of sub1, respectively, to be less than, to match, or to be grearter than the first len bytes of sub2
struct ustring ustring_null(void )
This function is declared in upipe/ustring.h source file, line 68.
This function returns an initialized ustring.
The return value is an ustring
This function is declared in upipe/ustring.h source file, line 172.
This function returns a shifted ustring.
Parameter list:
- sub: an ustring
- offset: offset in the ustring
The return value is the shifted ustring
This function is declared in upipe/ustring.h source file, line 329.
This function removes the characters absent from a set at the beginning and at the end of an ustring.
Parameter list:
- sub: an ustring
- set: set of non-removed characters
The return value is a sub ustring
This function is declared in upipe/ustring.h source file, line 290.
This function removes the characters of a set from the beginning and the end of an ustring.
Parameter list:
- sub: an ustring
- set: set of removed characters
The return value is a sub ustring
This function is declared in upipe/ustring.h source file, line 302.
This function returns a shifted ustring while characters are absent from set.
Parameter list:
- sub: an ustring
- set: set of rejected characters
The return value is a shifted ustring
This function is declared in upipe/ustring.h source file, line 263.
This function returns a shifted ustring while characters are present in set.
Parameter list:
- sub: an ustring
- set: set of allowed characters
The return value is a shifted ustring
This struct is declared in upipe/ustring.h source file, line 648.
This function is declared in upipe/ustring.h source file, line 584.
This function returns the matched prefix ignoring case or a null ustring and shift ustring sub.
Parameter list:
- sub: the ustring to test and shift
- prefix: the prefix to match
The return value is the matched prefix of a null ustring
This function is declared in upipe/ustring.h source file, line 602.
This function returns the matched prefix ignoring case or a null ustring and shift ustring sub.
Parameter list:
- sub: the ustring to test and shift
- prefix: the prefix to match
The return value is the matched prefix of a null ustring
This function is declared in upipe/ustring.h source file, line 548.
This function returns the matched prefix or a null ustring and shift ustring sub.
Parameter list:
- sub: the ustring to test and shift
- prefix: the prefix to match
The return value is the matched prefix of a null ustring
This function is declared in upipe/ustring.h source file, line 565.
This function returns the matched prefix or a null ustring and shift ustring sub.
Parameter list:
- sub: the ustring to test and shift
- prefix: the prefix to match
The return value is the matched prefix of a null ustring
This function is declared in upipe/ustring.h source file, line 533.
This function splits an ustring into two ustring at the first separator found.
Parameter list:
- sub: a pointer to an ustring
- separators: set of separators
The return value is the sub ustring before the separator
This function is declared in upipe/ustring.h source file, line 519.
This function returns the beginning of ustring sub containing only characters absent from set. And shift sub accordingly.
Parameter list:
- sub: an ustring
- set: set of allowed characters
The return value is an ustring
This function is declared in upipe/ustring.h source file, line 504.
This function returns the beginning of ustring sub containing only characters present in set. And shift sub accordingly.
Parameter list:
- sub: an ustring
- set: set of allowed characters
The return value is an ustring
This function is declared in upipe/ustring.h source file, line 157.
This function makes an ustring from another.
Parameter list:
- sub: an ustring
- offset: offset in the ustring sub
- length: length of the ustring sub to get
The return value is an ustring
This struct is declared in upipe/ustring.h source file, line 636.
struct ustring_byte ustring_to_byte(const struct ustring str)
This function is declared in upipe/ustring.h source file, line 723.
This function parsed a byte from an ustring.
Parameter list:
- str: string to parse from
The return value is a parsed byte
struct ustring_digit ustring_to_digit(const struct ustring str)
This function is declared in upipe/ustring.h source file, line 669.
This function parses a digit from an ustring.
Parameter list:
- str: string to parse from
The return value is a parsed digit
struct ustring_hexdigit ustring_to_hexdigit(const struct ustring str)
This function is declared in upipe/ustring.h source file, line 693.
This function parses a hexadecimal digit from an ustring.
Parameter list:
- str: string to parse from
The return value is a parsed hexadecimal digit
struct ustring_size ustring_to_size(const struct ustring str)
This function is declared in upipe/ustring.h source file, line 653.
int ustring_to_str(const struct ustring sub, char **str_p)
This function is declared in upipe/ustring.h source file, line 115.
This function allocated a string from an ustring.
Parameter list:
- sub: an ustring
- str_p: a pointer to a string
The return value is an error code
struct ustring_time ustring_to_time(const struct ustring str)
This function is declared in upipe/ustring.h source file, line 641.
struct ustring_time ustring_to_time_str(const char *str)
This function is declared in upipe/ustring.h source file, line 644.
struct ustring_uint64 ustring_to_uint64(const struct ustring str, int base)
This function is declared in upipe/ustring.h source file, line 628.
struct ustring_uint64 ustring_to_uint64_str(const char *str, int base)
This function is declared in upipe/ustring.h source file, line 632.
This function is declared in upipe/ustring.h source file, line 184.
This function returns a truncated ustring.
Parameter list:
- sub: an ustring
- length: to get from the ustring
The return value is the truncated ustring
This function is declared in upipe/ustring.h source file, line 315.
This function removes the characters absent from set from the end of an ustring.
Parameter list:
- sub: an ustring
- set: set of non-truncated characters
The return value is a truncated ustring
This function is declared in upipe/ustring.h source file, line 276.
This function removes the characters of a set from the end of an ustring.
Parameter list:
- sub: an ustring
- set: set of truncated characters
The return value is a truncated ustring
This struct is declared in upipe/ustring.h source file, line 623.
This function is declared in upipe/ustring.h source file, line 614.
This function is declared in upipe/ustring.h source file, line 230.
This function returns the beginning of an ustring containing only characters absent from set.
Parameter list:
- sub: an ustring
- set: set of rejected characters
The return value is an ustring containing the beginning of sub
This function is declared in upipe/ustring.h source file, line 247.
This function returns the end of an ustring containing only characters absent from set.
Parameter list:
- sub: an ustring
- set: set of rejected characters
The return value is an ustring containing the end of sub
This function is declared in upipe/ustring.h source file, line 197.
This function returns the beginning of an ustring containing only characters from set.
Parameter list:
- sub: an ustring
- set: set of allowed characters
The return value is an ustring containing the beginning of sub
This function is declared in upipe/ustring.h source file, line 213.
This function returns the end of an ustring containing only characters from set.
Parameter list:
- sub: an ustring
- set: set of allowed characters
The return value is an ustring containing the end of sub