Vuo
2.3.1
type
VuoText.h
Go to the documentation of this file.
1
10
#pragma once
11
20
#ifdef __cplusplus
21
extern
"C"
22
{
23
#endif
24
25
#include <stdbool.h>
26
#include <string.h>
27
struct
json_object
;
28
#include "
VuoTextCase.h
"
29
#include "
VuoTextComparison.h
"
30
#include "
VuoInteger.h
"
31
#include "
VuoList_VuoInteger.h
"
32
#include <stdint.h>
33
37
typedef
const
char
*
VuoText
;
38
40
typedef
const
struct
VuoList_VuoText_struct
{
void
*l; } *
VuoList_VuoText
;
41
#define VuoList_VuoText_TYPE_DEFINED
43
47
typedef
enum
48
{
49
VuoTextTruncation_Beginning,
50
VuoTextTruncation_End
51
}
VuoTextTruncation
;
52
53
VuoText
VuoText_makeFromJson
(
struct
json_object
* js);
54
struct
json_object
*
VuoText_getJson
(
const
VuoText
value);
55
char
*
VuoText_getSummary
(
const
VuoText
value);
56
57
VuoText
VuoText_make
(
const
char
* unquotedString);
58
VuoText
VuoText_makeWithMaxLength
(
const
void
*data,
const
size_t
maxLength);
59
VuoText
VuoText_makeFromCFString
(
const
void
*cfString);
60
VuoText
VuoText_makeFromData
(
const
unsigned
char
*data,
const
unsigned
long
size);
61
VuoText
VuoText_makeFromUtf32
(
const
uint32_t* data,
size_t
length);
62
VuoText
VuoText_makeFromMacRoman
(
const
char
*
string
);
63
size_t
VuoText_length
(
const
VuoText
text);
64
size_t
VuoText_byteCount
(
const
VuoText
text);
65
bool
VuoText_isEmpty
(
const
VuoText
text);
66
bool
VuoText_isPopulated
(
const
VuoText
text);
67
68
#define VuoText_SUPPORTS_COMPARISON
69
bool
VuoText_areEqual
(
const
VuoText
text1,
const
VuoText
text2);
70
bool
VuoText_isLessThan
(
const
VuoText
text1,
const
VuoText
text2);
71
72
bool
VuoText_isLessThanCaseInsensitive
(
const
VuoText
text1,
const
VuoText
text2);
73
bool
VuoText_isLessThanNumeric
(
const
VuoText
text1,
const
VuoText
text2);
74
bool
VuoText_compare
(
VuoText
a,
VuoTextComparison
comparison,
VuoText
b);
75
size_t
VuoText_findFirstOccurrence
(
const
VuoText
string
,
const
VuoText
substring,
const
size_t
startIndex);
76
size_t
VuoText_findLastOccurrence
(
const
VuoText
string
,
const
VuoText
substring);
77
VuoList_VuoInteger
VuoText_findOccurrences
(
const
VuoText
string
,
const
VuoText
substring);
78
VuoText
VuoText_substring
(
const
VuoText
string
,
int
startIndex,
int
length);
79
VuoText
VuoText_insert
(
const
VuoText
string
,
int
startIndex,
const
VuoText
newText);
80
VuoText
VuoText_removeAt
(
const
VuoText
string
,
int
startIndex,
int
length);
81
VuoText
VuoText_append
(
VuoText
*texts,
size_t
textsCount);
82
VuoText
VuoText_appendWithSeparator
(
VuoList_VuoText
texts,
VuoText
separator,
bool
includeEmptyParts);
83
VuoText
*
VuoText_split
(
VuoText
text,
VuoText
separator,
bool
includeEmptyParts,
size_t
*partsCount);
84
VuoText
VuoText_replace
(
VuoText
subject,
VuoText
stringToFind,
VuoText
replacement);
85
VuoText
VuoText_truncateWithEllipsis
(
const
VuoText
subject,
int
maxLength,
VuoTextTruncation
where);
86
VuoText
VuoText_trim
(
const
VuoText
text);
87
VuoText
VuoText_changeCase
(
const
VuoText
text,
VuoTextCase
textCase);
88
uint32_t*
VuoText_getUtf32Values
(
const
VuoText
text,
size_t
* length);
89
90
#ifndef DOXYGEN
91
#define VUOTEXT_FORMAT_ATTRIBUTE __attribute__((format(printf, 1, 2)))
92
#else
93
#define VUOTEXT_FORMAT_ATTRIBUTE
94
#endif
95
char
*
VuoText_format
(
const
char
*format, ...) VUOTEXT_FORMAT_ATTRIBUTE;
96
98
101
VuoText
VuoText_makeFromString
(const
char
*str);
102
char
*
VuoText_getString
(const
VuoText
value);
103
void
VuoText_retain
(
VuoText
value);
104
void
VuoText_release
(
VuoText
value);
106
111
#ifdef __cplusplus
112
}
113
#endif
Generated on Mon Jun 14 2021 18:58:47 for Vuo by
1.9.1