Vuo
2.0.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
42
typedef
enum
43
{
44
VuoTextTruncation_Beginning,
45
VuoTextTruncation_End
46
}
VuoTextTruncation
;
47
48
VuoText
VuoText_makeFromJson
(
struct
json_object
* js);
49
struct
json_object
*
VuoText_getJson
(
const
VuoText
value);
50
char
*
VuoText_getSummary
(
const
VuoText
value);
51
52
VuoText
VuoText_make
(
const
char
* unquotedString);
53
VuoText
VuoText_makeWithMaxLength
(
const
void
*data,
const
size_t
maxLength);
54
VuoText
VuoText_makeFromCFString
(
const
void
*cfString);
55
VuoText
VuoText_makeFromData
(
const
unsigned
char
*data,
const
unsigned
long
size);
56
VuoText
VuoText_makeFromUtf32
(
const
uint32_t* data,
size_t
length);
57
VuoText
VuoText_makeFromMacRoman
(
const
char
*
string
);
58
size_t
VuoText_length
(
const
VuoText
text);
59
size_t
VuoText_byteCount
(
const
VuoText
text);
60
bool
VuoText_isEmpty
(
const
VuoText
text);
61
bool
VuoText_isPopulated
(
const
VuoText
text);
62
63
#define VuoText_SUPPORTS_COMPARISON
64
bool
VuoText_areEqual
(
const
VuoText
text1,
const
VuoText
text2);
65
bool
VuoText_isLessThan
(
const
VuoText
text1,
const
VuoText
text2);
66
67
bool
VuoText_isLessThanCaseInsensitive
(
const
VuoText
text1,
const
VuoText
text2);
68
bool
VuoText_isLessThanNumeric
(
const
VuoText
text1,
const
VuoText
text2);
69
bool
VuoText_compare
(
VuoText
a,
VuoTextComparison
comparison,
VuoText
b);
70
size_t
VuoText_findFirstOccurrence
(
const
VuoText
string
,
const
VuoText
substring,
const
size_t
startIndex);
71
size_t
VuoText_findLastOccurrence
(
const
VuoText
string
,
const
VuoText
substring);
72
VuoList_VuoInteger
VuoText_findOccurrences
(
const
VuoText
string
,
const
VuoText
substring);
73
VuoText
VuoText_substring
(
const
VuoText
string
,
int
startIndex,
int
length);
74
VuoText
VuoText_insert
(
const
VuoText
string
,
int
startIndex,
const
VuoText
newText);
75
VuoText
VuoText_removeAt
(
const
VuoText
string
,
int
startIndex,
int
length);
76
VuoText
VuoText_append
(
VuoText
*texts,
size_t
textsCount);
77
VuoText
*
VuoText_split
(
VuoText
text,
VuoText
separator,
bool
includeEmptyParts,
size_t
*partsCount);
78
VuoText
VuoText_replace
(
VuoText
subject,
VuoText
stringToFind,
VuoText
replacement);
79
VuoText
VuoText_truncateWithEllipsis
(
const
VuoText
subject,
int
maxLength,
VuoTextTruncation
where);
80
VuoText
VuoText_trim
(
const
VuoText
text);
81
VuoText
VuoText_changeCase
(
const
VuoText
text,
VuoTextCase
textCase);
82
uint32_t*
VuoText_getUtf32Values
(
const
VuoText
text,
size_t
* length);
83
84
#ifndef DOXYGEN
85
#define VUOTEXT_FORMAT_ATTRIBUTE __attribute__((format(printf, 1, 2)))
86
#else
87
#define VUOTEXT_FORMAT_ATTRIBUTE
88
#endif
89
char
*
VuoText_format
(
const
char
*format, ...) VUOTEXT_FORMAT_ATTRIBUTE;
90
92
95
VuoText
VuoText_makeFromString
(const
char
*str);
96
char
*
VuoText_getString
(const
VuoText
value);
97
void
VuoText_retain
(
VuoText
value);
98
void
VuoText_release
(
VuoText
value);
100
105
#ifdef __cplusplus
106
}
107
#endif
Generated on Sat Mar 14 2020 13:04:39 for Vuo by
1.8.17