Vuo
2.4.2
Loading...
Searching...
No Matches
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
*
string
);
58
VuoText
VuoText_makeWithoutCopying
(
const
char
*
string
);
59
VuoText
VuoText_makeWithMaxLength
(
const
void
*data,
const
size_t
maxLength);
60
VuoText
VuoText_makeFromCFString
(
const
void
*cfString);
61
VuoText
VuoText_makeFromData
(
const
unsigned
char
*data,
const
unsigned
long
size);
62
VuoText
VuoText_makeFromUtf32
(
const
uint32_t* data,
size_t
length);
63
VuoText
VuoText_makeFromMacRoman
(
const
char
*
string
);
64
size_t
VuoText_length
(
const
VuoText
text);
65
size_t
VuoText_byteCount
(
const
VuoText
text);
66
bool
VuoText_isEmpty
(
const
VuoText
text);
67
bool
VuoText_isPopulated
(
const
VuoText
text);
68
69
#define VuoText_SUPPORTS_COMPARISON
70
bool
VuoText_areEqual
(
const
VuoText
text1,
const
VuoText
text2);
71
bool
VuoText_isLessThan
(
const
VuoText
text1,
const
VuoText
text2);
72
73
bool
VuoText_isLessThanCaseInsensitive
(
const
VuoText
text1,
const
VuoText
text2);
74
bool
VuoText_isLessThanNumeric
(
const
VuoText
text1,
const
VuoText
text2);
75
bool
VuoText_compare
(
VuoText
a,
VuoTextComparison
comparison,
VuoText
b);
76
size_t
VuoText_findFirstOccurrence
(
const
VuoText
string
,
const
VuoText
substring,
const
size_t
startIndex);
77
size_t
VuoText_findLastOccurrence
(
const
VuoText
string
,
const
VuoText
substring);
78
VuoList_VuoInteger
VuoText_findOccurrences
(
const
VuoText
string
,
const
VuoText
substring);
79
VuoText
VuoText_substring
(
const
VuoText
string
,
int
startIndex,
int
length);
80
VuoText
VuoText_insert
(
const
VuoText
string
,
int
startIndex,
const
VuoText
newText);
81
VuoText
VuoText_removeAt
(
const
VuoText
string
,
int
startIndex,
int
length);
82
VuoText
VuoText_append
(
VuoText
*texts,
size_t
textsCount);
83
VuoText
VuoText_appendWithSeparator
(
VuoList_VuoText
texts,
VuoText
separator,
bool
includeEmptyParts);
84
VuoText
*
VuoText_split
(
VuoText
text,
VuoText
separator,
bool
includeEmptyParts,
size_t
*partsCount);
85
VuoText
VuoText_replace
(
VuoText
subject,
VuoText
stringToFind,
VuoText
replacement);
86
VuoText
VuoText_truncateWithEllipsis
(
const
VuoText
subject,
int
maxLength,
VuoTextTruncation
where);
87
VuoText
VuoText_trim
(
const
VuoText
text);
88
VuoText
VuoText_changeCase
(
const
VuoText
text,
VuoTextCase
textCase);
89
uint32_t*
VuoText_getUtf32Values
(
const
VuoText
text,
size_t
* length);
90
91
#ifndef DOXYGEN
92
#define VUOTEXT_FORMAT_ATTRIBUTE __attribute__((format(printf, 1, 2)))
93
#else
94
#define VUOTEXT_FORMAT_ATTRIBUTE
95
#endif
96
char
*
VuoText_format
(
const
char
*format, ...) VUOTEXT_FORMAT_ATTRIBUTE;
97
99
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 Tue Sep 27 2022 20:46:22 for Vuo by
1.9.5