upipe/ustring.h header reference

Upipe sub string manipulation More

Header inclusion  

Members  

Types  

Functions  

Description  

Upipe sub string manipulation

Members detail  

#define USTRING_ALPHA  

This macro is declared in upipe/ustring.h source file, line 50.

#define USTRING_ALPHA_LOWER  

This macro is declared in upipe/ustring.h source file, line 42.

#define USTRING_ALPHA_UPPER  

This macro is declared in upipe/ustring.h source file, line 46.

#define USTRING_DIGIT  

This macro is declared in upipe/ustring.h source file, line 51.

#define USTRING_HEXDIGIT  

This macro is declared in upipe/ustring.h source file, line 52.

#define _UPIPE_USTRING_H_  

This macro is declared in upipe/ustring.h source file, line 31.

struct ustring  

This struct is declared in upipe/ustring.h source file, line 56.

This struct stores a portion of a string.

FieldDescription
char * at;pointer to the first character
size_t len;length from the first character

struct ustring_byte  

This struct is declared in upipe/ustring.h source file, line 710.

This struct stores a parsed byte.

FieldDescription
struct ustring str;matching part of the string
uint8_t value;value of the parsed byte

int ustring_casecmp(const struct ustring sub1, const struct ustring sub2)  

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

bool ustring_casematch(const struct ustring sub, const struct ustring prefix)  

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

bool ustring_casematch_sfx(const struct ustring sub, const struct ustring suffix)  

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

int ustring_cmp(const struct ustring sub1, const struct ustring sub2)  

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

struct ustring_digit  

This struct is declared in upipe/ustring.h source file, line 656.

This struct stores a parsed digit.

FieldDescription
struct ustring str;matching part of the string
uint8_t value;digit value

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

struct ustring_hexdigit  

This struct is declared in upipe/ustring.h source file, line 679.

This struct stores a parsed hexadecimal digit.

FieldDescription
struct ustring str;matching part of the string
uint8_t value;hexdecimal value

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.

bool ustring_match(const struct ustring sub, const struct ustring prefix)  

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

bool ustring_match_sfx(const struct ustring sub, const struct ustring suffix)  

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

int ustring_ncasecmp(const struct ustring sub1, const struct ustring sub2, size_t len)  

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

int ustring_ncmp(const struct ustring sub1, const struct ustring sub2, size_t len)  

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

struct ustring ustring_shift(const struct ustring sub, size_t offset)  

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

struct ustring ustring_shift_truncate_until(const struct ustring sub, const char *set)  

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

struct ustring ustring_shift_truncate_while(const struct ustring sub, const char *set)  

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

struct ustring ustring_shift_until(const struct ustring sub, const char *set)  

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

struct ustring ustring_shift_while(const struct ustring sub, const char *set)  

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

struct ustring_size  

This struct is declared in upipe/ustring.h source file, line 648.

FieldDescription
struct ustring str;
uint64_t value;

struct ustring ustring_split_casematch(struct ustring *sub, const struct ustring prefix)  

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

struct ustring ustring_split_casematch_str(struct ustring *sub, const char *prefix)  

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

struct ustring ustring_split_match(struct ustring *sub, const struct ustring prefix)  

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

struct ustring ustring_split_match_str(struct ustring *sub, const char *prefix)  

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

struct ustring ustring_split_sep(struct ustring *sub, const char *separators)  

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

struct ustring ustring_split_until(struct ustring *sub, const char *set)  

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

struct ustring ustring_split_while(struct ustring *sub, const char *set)  

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

struct ustring ustring_sub(struct ustring sub, size_t offset, size_t length)  

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

struct ustring_time  

This struct is declared in upipe/ustring.h source file, line 636.

FieldDescription
struct ustring str;
uint64_t value;

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.

struct ustring ustring_truncate(const struct ustring sub, size_t length)  

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

struct ustring ustring_truncate_until(const struct ustring sub, const char *set)  

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

struct ustring ustring_truncate_while(const struct ustring sub, const char *set)  

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

struct ustring_uint64  

This struct is declared in upipe/ustring.h source file, line 623.

FieldDescription
struct ustring str;
uint64_t value;

struct ustring ustring_unframe(const struct ustring ustring, char c)  

This function is declared in upipe/ustring.h source file, line 614.

struct ustring ustring_until(const struct ustring sub, const char *set)  

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

struct ustring ustring_until_reverse(const struct ustring sub, const char *set)  

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

struct ustring ustring_while(const struct ustring sub, const char *set)  

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

struct ustring ustring_while_reverse(const struct ustring sub, const char *set)  

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

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:20 2018 using MkDoc