Vuo  1.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Typedefs | Functions
VuoText.h File Reference


VuoText C type definition.


typedef const char * VuoText
 A Unicode (UTF-8) text string.


VuoText VuoText_makeFromJson (json_object *js)
 Decodes the JSON object js, expected to contain a UTF-8 string, to create a new value.
json_objectVuoText_getJson (const VuoText value)
 Encodes value as a JSON object.
char * VuoText_getSummary (const VuoText value)
 Creates a new UTF-8 C string from value, or, if it's more than 50 Unicode characters long, creates an aposiopesis.
VuoText VuoText_make (const char *unquotedString)
 Creates a VuoText value from an unquoted string (unlike VuoText_makeFromString(), which expects a quoted string).
VuoText VuoText_makeWithMaxLength (const void *data, const size_t maxLength)
 Creates a VuoText value from an untrusted source (one that might not contain a NULL terminator within its memory page).
VuoText VuoText_makeFromCFString (const void *cfString)
 Creates a VuoText value from a CFStringRef.
VuoText VuoText_makeFromData (const unsigned char *data, const unsigned long size)
 Attempts to interpret data as UTF-8 text.
size_t VuoText_length (const VuoText text)
 Returns the number of Unicode characters in the text.
bool VuoText_areEqual (const VuoText text1, const VuoText text2)
 Returns true if the two texts represent the same Unicode string (even if they use different UTF-8 encodings or Unicode character decompositions).
bool VuoText_isLessThan (const VuoText text1, const VuoText text2)
 Returns true if text1 is ordered before text2 in a case-sensitive lexicographic ordering (which treats different UTF-8 encodings and Unicode character decompositions as equivalent).
size_t VuoText_findFirstOccurrence (const VuoText string, const VuoText substring, const size_t startIndex)
 Returns the index (starting at 1) of the first instance of substring in string at index >= startIndex.
size_t VuoText_findLastOccurrence (const VuoText string, const VuoText substring)
 Returns the index (starting at 1) of the last instance of substring in string.
VuoText VuoText_substring (const VuoText string, int startIndex, int length)
 Returns the substring of string starting at index startIndex and spanning length Unicode characters.
VuoText VuoText_append (VuoText *texts, size_t textsCount)
 Returns a string consisting of the elements in the texts array concatenated together.
VuoTextVuoText_split (VuoText text, VuoText separator, bool includeEmptyParts, size_t *partsCount)
 Splits text into parts (basically the inverse of VuoText_append()).
VuoText VuoText_replace (VuoText subject, VuoText stringToFind, VuoText replacement)
 Returns a new string in which each occurrence of stringToFind in subject has been replaced with replacement.
VuoText VuoText_truncateWithEllipsis (const VuoText subject, int maxLength)
 If subject is less than or equal to maxLength Unicode characters long, returns subject.
VuoText VuoText_trim (const VuoText text)
 Returns a new string consisting of text without the whitespace at the beginning and end.
char * VuoText_format (const char *format,...) VUOTEXT_FORMAT_ATTRIBUTE
 Returns a new string formatted using the printf-style format string.
VuoText VuoText_makeFromString (const char *str)
 Automatically generated function.
char * VuoText_getString (const VuoText value)
 Automatically generated function.
void VuoText_retain (VuoText value)
 Automatically generated function.
void VuoText_release (VuoText value)
 Automatically generated function.