VuoString implementation.
Functions | |
char * | VuoString_stpncpy (char *dest, const char *src, size_t n) |
The stpncpy function is not provided by Mac OS X implementation of <string.h>. | |
VuoString | VuoString_valueFromString (const char *initializer) |
Creates a new VuoString from the UTF-8 C string initializer . | |
char * | VuoString_stringFromValue (const VuoString value) |
Creates a new UTF-8 C string from value . | |
char * | VuoString_summaryFromValue (const VuoString value) |
Creates a new double-quoted UTF-8 C string from value , or, if it's more than 32 characters long, creates an aposiopesis. | |
size_t | VuoString_convertUTF8IndexToByteIndex (UText *text, int logicalCharIndex) |
Returns the byte offset of logicalCharIndex into text's UTF-8 representation. | |
size_t | VuoString_length (const VuoString string) |
Returns the number of UTF-8 characters in the string. | |
const char * | VuoString_substring (const VuoString string, size_t startIndex, size_t length) |
Returns the substring of string starting at index startIndex and spanning length UTF-8 characters. | |
char* VuoString_stpncpy | ( | char * | dest, |
const char * | src, | ||
size_t | n | ||
) |
The stpncpy function is not provided by Mac OS X implementation of <string.h>.
Rather than adding a dependency, just define it here. This is getting replaced anyway with Unicode-aware code. http://pubs.opengroup.org/onlinepubs/9699919799/functions/strncpy.html