Vuo
0.6.1
|
A Unicode (UTF-8) text string.
Typedefs | |
typedef const char * | VuoText |
A Unicode (UTF-8) text string. | |
Functions | |
char * | VuoText_stpncpy (char *dest, const char *src, size_t n) |
The stpncpy function is not provided by Mac OS X implementation of <string.h>. | |
VuoText | VuoText_valueFromJson (json_object *js) |
Decodes the JSON object js , expected to contain a string, to create a new value. | |
json_object * | VuoText_jsonFromValue (const VuoText value) |
Encodes value as a JSON object. | |
char * | VuoText_summaryFromValue (const VuoText value) |
Creates a new UTF-8 C string from value , or, if it's more than 32 characters long, creates an aposiopesis. | |
VuoText | VuoText_make (const char *unquotedString) |
Creates a VuoText value from an unquoted string (unlike VuoText_valueFromString() , which expects a quoted string). | |
size_t | VuoText_convertUTF8IndexToByteIndex (UText *text, int logicalCharIndex) |
Returns the byte offset of logicalCharIndex into text's UTF-8 representation. | |
size_t | VuoText_length (const VuoText string) |
Returns the number of UTF-8 characters in the string. | |
size_t | VuoText_getIndexOfLastCharacter (const VuoText string, const VuoText character) |
Returns the index (starting at 1) of the last instance of character in string . | |
VuoText | VuoText_substring (const VuoText string, int startIndex, int length) |
Returns the substring of string starting at index startIndex and spanning length UTF-8 characters. | |
VuoText | VuoText_append (VuoText *texts, unsigned long textsCount) |
Returns a string consisting of the elements in the texts array concatenated together. | |
VuoText | VuoText_valueFromString (const char *str) |
Automatically generated function. | |
char * | VuoText_stringFromValue (const VuoText value) |
Automatically generated function. | |
typedef const char* VuoText |
A Unicode (UTF-8) text string.
Returns a string consisting of the elements in the texts
array concatenated together.
size_t VuoText_convertUTF8IndexToByteIndex | ( | UText * | text, |
int | logicalCharIndex | ||
) |
Returns the byte offset of logicalCharIndex
into text's
UTF-8 representation.
Returns the index (starting at 1) of the last instance of character
in string
.
Returns 0 if the character is not found.
|
read |
Encodes value
as a JSON object.
size_t VuoText_length | ( | const VuoText | string | ) |
Returns the number of UTF-8 characters in the string.
VuoText VuoText_make | ( | const char * | unquotedString | ) |
Creates a VuoText value from an unquoted string (unlike VuoText_valueFromString()
, which expects a quoted string).
char* VuoText_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
char* VuoText_stringFromValue | ( | const VuoText | value | ) |
Automatically generated function.
Returns the substring of string
starting at index startIndex
and spanning length
UTF-8 characters.
startIndex
is indexed from 1, not 0.
If startIndex
is past the end of the string, returns the empty string.
If string
has fewer than length
characters from startIndex
to the end of string
, returns all characters from startIndex
to the end of string
.
char * VuoText_summaryFromValue | ( | const VuoText | value | ) |
Creates a new UTF-8 C string from value
, or, if it's more than 32 characters long, creates an aposiopesis.
VuoText VuoText_valueFromJson | ( | json_object * | js | ) |
Decodes the JSON object js
, expected to contain a string, to create a new value.
VuoText VuoText_valueFromString | ( | const char * | str | ) |
Automatically generated function.