DEADSOFTWARE

Patched for Linux
[mp3cc.git] / MPC.3.5.LINUX / util / strings.h
1 /********************************************************************
3 strings.h - declaration of a string-handling routines
5 Niksa Orlic, 2004-04-19
7 ********************************************************************/
9 struct string_struct
10 {
11 char *cstr;
12 short int length;
13 short int allocated;
14 };
16 typedef struct string_struct string;
19 /*
20 Create an empty string
21 */
22 string* string_create();
25 /*
26 Create a copy of the string
27 */
28 string* string_duplicate(string*);
31 /*
32 Create a string from a C-style string
33 */
34 string* string_from_cstr(char *cstr);
37 /*
38 Free all memory used by the string
39 */
40 void string_destroy(string*);
43 /*
44 Empties the given string
45 */
46 void string_empty(string*);
49 /*
50 Append the second string to the first string
51 */
52 void string_append(string*, string*);
55 /*
56 Append the C-style string to the string
57 */
58 void string_append_cstr(string*, char*);
61 /*
62 Get the C-style string from a given string
63 */
64 char* string_get_cstr(string*);
67 /*
68 Get the string length
69 */
70 short int string_length(string*);
73 /*
74 Translates a string into lower case
75 */
76 void lowercase(char *);