|
|
|
@ -81,8 +81,10 @@ void gpr_reverse_bytes(char *str, int len); |
|
|
|
|
the result is undefined. */ |
|
|
|
|
int gpr_asprintf(char **strp, const char *format, ...); |
|
|
|
|
|
|
|
|
|
/* Join a set of strings, returning the resulting string */ |
|
|
|
|
char *gpr_strjoin(const char **strs, size_t nstrs); |
|
|
|
|
/* Join a set of strings, returning the resulting string.
|
|
|
|
|
Total combined length (excluding null terminator) is returned in total_length |
|
|
|
|
if it is non-null. */ |
|
|
|
|
char *gpr_strjoin(const char **strs, size_t nstrs, size_t *total_length); |
|
|
|
|
|
|
|
|
|
/* A vector of strings... addition takes ownership of strings */ |
|
|
|
|
typedef struct { |
|
|
|
@ -94,7 +96,7 @@ typedef struct { |
|
|
|
|
void gpr_strvec_init(gpr_strvec *strs); |
|
|
|
|
void gpr_strvec_destroy(gpr_strvec *strs); |
|
|
|
|
void gpr_strvec_add(gpr_strvec *strs, char *add); |
|
|
|
|
char *gpr_strvec_flatten(gpr_strvec *strs); |
|
|
|
|
char *gpr_strvec_flatten(gpr_strvec *strs, size_t *total_length); |
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
} |
|
|
|
|