#include <sys/types.h>
Go to the source code of this file.
Functions | |
char * | ipod_string_new (void) |
Allocates a new zero-terminated string on the heap. | |
char * | ipod_string_new_from (const char *s) |
Allocates a new zero-terminated string on the heap copied from the given string. | |
char * | ipod_string_new_from_array (const char *s, size_t length) |
Allocates a new string on the heap created from an array of characters. | |
char * | ipod_string_set (char *s, const char *ss) |
Copy a string into an exising allocated string, resizing as necessary. | |
void | ipod_string_free (char *s) |
Free the string back to the heap. | |
char * | ipod_string_zero (char *s) |
Resize an existing string to an empty string. | |
char * | ipod_string_realloc (char *src, size_t length) |
Reallocate an existing string to hold the given length, plus the terminating null. | |
char * | ipod_string_append (char *src, const char *a) |
Append a string to an existing string. | |
void | ipod_string_replace_char (char *src, const char a, const char b) |
Destructively replace all instances of a with b in an existing string. | |
size_t | ipod_string_utf16_to_utf8_length (const char *src, size_t numChars) |
Calculate the number of bytes necessary for a UTF-8 encoding of an array of UTF-16LE characters. | |
size_t | ipod_string_utf16_to_utf8 (const char *src, size_t numChars, char *dst, size_t maxLen) |
Convert an array of UTF-16LE characters to UTF-8. | |
size_t | ipod_string_utf8_to_utf16_length (const char *s) |
Calculate the number of UTF-16LE characters in a null terminated UTF-8 string. | |
size_t | ipod_string_utf8_to_utf16 (const char *src, char *dst, size_t maxLen) |
Convert a string of UTF-8 characters into an array of UTF-16LE characters. | |
char * | ipod_string_utf8_from_utf16 (const char *src, size_t numChars) |
Convert an array of UTF-16LE characters to a UTF-8 string allocated on the heap. | |
char * | ipod_string_utf16_from_utf8 (const char *src, size_t *numChars) |
Convert a UTF-8 encoded string to an array of UTF-16LE characters allocated on the heap. | |
char * | ipod_string_utf16_from_iso8859 (const char *src, size_t *numChars) |
Convert an ISO-8859-1 encoded string to an array of UTF-16LE characters allocated on the heap. | |
char * | ipod_string_iso8859_from_utf16 (const char *src, size_t numChars) |
Convert an array of UTF-16LE characters to an ISO-8859-1 string allocated on the heap. | |
char * | ipod_string_utf8_from_iso8859 (const char *src) |
Convert a string of ISO-8859-1 characters to UTF-8. | |
char * | ipod_string_iso8859_from_utf8 (const char *src) |
Convert a string of UTF-8 characters to ISO-8859-1. | |
int | ipod_string_compare_utf16 (const char *a, size_t numCharsA, const char *b, size_t numCharsB) |
Compare two arrays of UTF-16LE characters. | |
void | ipod_string_report (void) |
Print out some internal statistics. |
The iPod data structures store text in a variety of formats. The bulk of the text items are stored in UTF-16LE, but some are in either ASCII or UTF-8. The libipod API normalizes all of them to UTF-8, although the C++ binding will also support ISO-8859-1.
|
Append a string to an existing string.
|
|
Compare two arrays of UTF-16LE characters.
|
|
Free the string back to the heap.
|
|
Convert an array of UTF-16LE characters to an ISO-8859-1 string allocated on the heap.
|
|
Convert a string of UTF-8 characters to ISO-8859-1.
|
|
Allocates a new zero-terminated string on the heap.
|
|
Allocates a new zero-terminated string on the heap copied from the given string.
|
|
Allocates a new string on the heap created from an array of characters.
|
|
Reallocate an existing string to hold the given length, plus the terminating null.
|
|
Destructively replace all instances of a with b in an existing string.
|
|
Copy a string into an exising allocated string, resizing as necessary.
|
|
Convert an ISO-8859-1 encoded string to an array of UTF-16LE characters allocated on the heap.
|
|
Convert a UTF-8 encoded string to an array of UTF-16LE characters allocated on the heap.
|
|
Convert an array of UTF-16LE characters to UTF-8.
|
|
Calculate the number of bytes necessary for a UTF-8 encoding of an array of UTF-16LE characters.
|
|
Convert a string of ISO-8859-1 characters to UTF-8.
|
|
Convert an array of UTF-16LE characters to a UTF-8 string allocated on the heap.
|
|
Convert a string of UTF-8 characters into an array of UTF-16LE characters.
|
|
Calculate the number of UTF-16LE characters in a null terminated UTF-8 string.
|
|
Resize an existing string to an empty string.
|