00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __IPOD_STRING_H__
00023 #define __IPOD_STRING_H__
00024
00025 #include <sys/types.h>
00026
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030
00044 extern char *ipod_string_new(void);
00045
00051 extern char *ipod_string_new_from(const char *s);
00052
00059 extern char *ipod_string_new_from_array(const char *s, size_t length);
00060
00067 extern char *ipod_string_set(char *s,const char *ss);
00068
00073 extern void ipod_string_free(char *s);
00074
00080 extern char *ipod_string_zero(char *s);
00081
00088 extern char *ipod_string_realloc(char *src, size_t length);
00089
00096 extern char *ipod_string_append(char *src,const char *a);
00097
00104 extern void ipod_string_replace_char(char *src, const char a, const char b);
00105
00112 extern size_t ipod_string_utf16_to_utf8_length(const char *src, size_t numChars);
00113
00122 extern size_t ipod_string_utf16_to_utf8(const char *src, size_t numChars, char *dst, size_t maxLen);
00123
00129 extern size_t ipod_string_utf8_to_utf16_length(const char *s);
00130
00138 extern size_t ipod_string_utf8_to_utf16(const char *src, char *dst, size_t maxLen);
00139
00146 extern char *ipod_string_utf8_from_utf16(const char *src,size_t numChars);
00147
00154 extern char *ipod_string_utf16_from_utf8(const char *src,size_t *numChars);
00155
00162 extern char *ipod_string_utf16_from_iso8859(const char *src,size_t *numChars);
00163
00170 extern char *ipod_string_iso8859_from_utf16(const char *src,size_t numChars);
00171
00177 extern char *ipod_string_utf8_from_iso8859(const char *src);
00178
00184 extern char *ipod_string_iso8859_from_utf8(const char *src);
00185
00194 extern int ipod_string_compare_utf16(const char *a, size_t numCharsA, const char *b, size_t numCharsB);
00195
00198 extern void ipod_string_report(void);
00199
00200 #ifdef __cplusplus
00201 };
00202 #endif
00203
00204 #endif