#include <common/ac/stddef.h>
#include <common/ac/stdarg.h>
#include <common/main.h>
Go to the source code of this file.
Data Structures | |
struct | string_ty |
Defines | |
#define | str_equal(s1, s2) ((s1) == (s2)) |
test string equality | |
Typedefs | |
typedef unsigned long | str_hash_ty |
Functions | |
void | str_release (void) |
string_ty * | str_from_c (const char *str) |
make string from C string | |
string_ty * | str_n_from_c (const char *str, size_t len) |
make string from C string | |
string_ty * | str_copy (string_ty *str) |
make a copy of a string | |
void | str_free (string_ty *str) |
release a string | |
string_ty * | str_catenate (string_ty *str1, string_ty *str2) |
join two strings together | |
string_ty * | str_cat_three (string_ty *str1, string_ty *str2, string_ty *str3) |
joing strings together | |
int | str_bool (string_ty *str) |
test a boolean | |
string_ty * | str_upcase (string_ty *str) |
convert to upper case | |
string_ty * | str_downcase (string_ty *str) |
convert to lower case | |
string_ty * | str_capitalize (string_ty *str) |
convert to title case | |
void | str_dump (void) |
dump the string table | |
string_ty * | str_field (string_ty *str, int sep, int nth) |
extract a field | |
void | slow_to_fast (const char *const *, string_ty **, size_t) |
convert tables of strings | |
string_ty * | str_format (const char *fmt,...) |
format text | |
string_ty * | str_vformat (const char *fmt, va_list ap) |
format text | |
int | str_equal (string_ty *str1, string_ty *str2) |
test string equality | |
string_ty * | str_quote_shell (string_ty *str) |
quote shell meta-characters | |
string_ty * | str_trim (string_ty *str) |
remove excess white space | |
string_ty * | str_snip (string_ty *str) |
remove leading and trailing white space | |
int | str_validate (const string_ty *str) |
check is valid | |
int | str_leading_prefix (string_ty *haystack, string_ty *needle) |
look for a leading prefix | |
int | str_trailing_suffix (string_ty *haystack, string_ty *needle) |
look for a trailing suffix | |
string_ty * | str_identifier (string_ty *str) |
string_ty * | str_replace (string_ty *str, string_ty *lhs, string_ty *rhs, int maximum=-1) |