common/str.h File Reference

#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_tystr_from_c (const char *str)
 make string from C string
string_tystr_n_from_c (const char *str, size_t len)
 make string from C string
string_tystr_copy (string_ty *str)
 make a copy of a string
void str_free (string_ty *str)
 release a string
string_tystr_catenate (string_ty *str1, string_ty *str2)
 join two strings together
string_tystr_cat_three (string_ty *str1, string_ty *str2, string_ty *str3)
 joing strings together
int str_bool (string_ty *str)
 test a boolean
string_tystr_upcase (string_ty *str)
 convert to upper case
string_tystr_downcase (string_ty *str)
 convert to lower case
string_tystr_capitalize (string_ty *str)
 convert to title case
void str_dump (void)
 dump the string table
string_tystr_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_tystr_format (const char *fmt,...)
 format text
string_tystr_vformat (const char *fmt, va_list ap)
 format text
int str_equal (string_ty *str1, string_ty *str2)
 test string equality
string_tystr_quote_shell (string_ty *str)
 quote shell meta-characters
string_tystr_trim (string_ty *str)
 remove excess white space
string_tystr_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_tystr_identifier (string_ty *str)
string_tystr_replace (string_ty *str, string_ty *lhs, string_ty *rhs, int maximum=-1)


Generated on Wed Mar 12 23:37:36 2008 for Aegis by  doxygen 1.5.5