24 char*
ztrcpy(
size_t size,
char * dest,
const char * src );
25 char*
ztrcat(
size_t size,
char * dest,
const char * src );
28 char*
ztrins(
size_t size,
char * dest,
size_t i,
const char *insert );
29 char*
strdel(
char * dest,
size_t len );
30 char*
ztrsub(
size_t size,
char * dest,
const char *src,
size_t len );
33 char*
strltrim(
const char * str ,
char tr );
34 char*
strrtrim(
char * str ,
char tr );
35 char*
strtrim(
char * str ,
char tr );
38 size_t memczap(
size_t size,
void *mem,
int ch );
41 int strpfx(
const char *str,
const char *prefix );
42 int strsffx(
const char *str,
const char *suffix );
45 size_t strrspn(
const char * str,
char a,
char z );
48 char strxltn1(
char accented_latin_1 );
50 #define removeAccented( str ) strxacct( str )
56 #if __STDC_VERSION__ < 199901L
62 #define strxltn1_translate \
64 "AAAAAAECEEEEIIIIDNOOOOOx0UUUUYPsaaaaaaeceeeeiiiidnooooo/0uuuuypy"
86 inline char strxltn1(
char accented_latin_1 ) {
88 accented_latin_1 &= 0xFF;
90 if ( (
unsigned char)(accented_latin_1) >= 192 ) {
93 return accented_latin_1;
98 #define strxltn1( accented_latin_1 ) \
99 ( ( (unsigned char)(accented_latin_1) < 192 ) \
101 : strxltn1_translate[ (unsigned char)(accented_latin_1) - 192 ] \
104 #define strxltn1( accented_latin_1 ) \
105 ( ( (unsigned char)(accented_latin_1) < 192 ) \
107 : 0xFF & strxltn1_translate[ (unsigned char)(accented_latin_1) - 192 ] \
size_t memczap(size_t size, void *mem, int ch)
Removes every ocurrence of 'ch' from 'mem'.
char * strtrim(char *str, char tr)
return strrtrim( strltrim(s,tr),tr ).
char * strxacct(char *str)
Uses strxltn1() to convert all letters in 'str'.
int strsffx(const char *str, const char *suffix)
Returns '1' if 'suffix' is a suffix of 'str'.
size_t strrspn(const char *str, char a, char z)
Get span until character in character range '[a..z]'.
char * strrtrim(char *str, char tr)
Removes from 'str' all trailing characters that are equal to 'tr'.
#define strxltn1_translate
Translation table for strxltn1().
char * ztrcat(size_t size, char *dest, const char *src)
Append characters to a string.
char * strdel(char *dest, size_t len)
Deletes the leading 'len' characters from 'str'.
char * strltrim(const char *str, char tr)
Returns a pointer to the first character in 'str' different from 'tr'.
char * ztrsub(size_t size, char *dest, const char *src, size_t len)
Copies the first 'len' characters from 'src' to 'dest'.
int strpfx(const char *str, const char *prefix)
Returns '1' if 'prefix' is a prefix of 'str'.
char * ztrcpy(size_t size, char *dest, const char *src)
Copies up to 'size' characters from 'src' to 'dest'.
char strxltn1(char accented_latin_1)
Translates characters in range [192<–>192+63] into letters or ASCII symbols that look similar...
char * ztrins(size_t size, char *dest, size_t i, const char *insert)
Inserts string 'insert' into 'dest' at position 'n'.