Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_StringArray.c
Go to the documentation of this file.
1
// typedef?
2
3
class
SCR_StringArray
: array<string>
4
{
5
//------------------------------------------------------------------------------------------------
7
int
CountEmptyEntries()
8
{
9
int
result;
10
for
(
int
i =
Count
() - 1; i >= 0; --i)
11
{
12
if
(
Get
(i).
IsEmpty
())
13
result++;
14
}
15
16
return
result;
17
}
18
19
//------------------------------------------------------------------------------------------------
21
int
CountEmptyOrWhiteSpaceEntries()
22
{
23
int
result;
24
for
(
int
i =
Count
() - 1; i >= 0; --i)
25
{
26
if
(
SCR_StringHelper
.
IsEmptyOrWhiteSpace
(
Get
(i)))
27
result++;
28
}
29
30
return
result;
31
}
32
33
//------------------------------------------------------------------------------------------------
37
string
Join(
string
separator =
string
.Empty,
bool
joinEmptyEntries =
true
)
38
{
39
return
SCR_StringHelper
.
Join
(separator,
this
, joinEmptyEntries);
40
}
41
42
//------------------------------------------------------------------------------------------------
44
bool
HasEmptyEntry()
45
{
46
for
(
int
i =
Count
() - 1; i >= 0; --i)
47
{
48
if
(
Get
(i).
IsEmpty
())
49
return
true
;
50
}
51
return
false
;
52
}
53
54
//------------------------------------------------------------------------------------------------
56
bool
HasEmptyOrWhiteSpaceEntry()
57
{
58
for
(
int
i =
Count
() - 1; i >= 0; --i)
59
{
60
if
(
SCR_StringHelper
.
IsEmptyOrWhiteSpace
(
Get
(i)))
61
return
true
;
62
}
63
return
false
;
64
}
65
66
//------------------------------------------------------------------------------------------------
69
int
RemoveEmptyEntries()
70
{
71
int
removed;
72
for
(
int
i =
Count
() - 1; i >= 0; --i)
73
{
74
if
(
Get
(i).
IsEmpty
())
75
{
76
RemoveOrdered
(i);
77
++removed;
78
}
79
}
80
81
return
removed;
82
}
83
84
//------------------------------------------------------------------------------------------------
87
int
RemoveEmptyOrWhiteSpaceEntries()
88
{
89
int
removed;
90
for
(
int
i =
Count
() - 1; i >= 0; --i)
91
{
92
if
(
SCR_StringHelper
.
IsEmptyOrWhiteSpace
(
Get
(i)))
93
{
94
RemoveOrdered
(i);
95
++removed;
96
}
97
}
98
99
return
removed;
100
}
101
102
//------------------------------------------------------------------------------------------------
104
void
ToLower()
105
{
106
foreach
(
int
i,
string
entry :
this
)
107
{
108
entry.ToLower();
109
Set
(i, entry);
110
}
111
}
112
113
//------------------------------------------------------------------------------------------------
115
void
ToUpper()
116
{
117
foreach
(
int
i,
string
entry :
this
)
118
{
119
entry.ToUpper();
120
Set
(i, entry);
121
}
122
}
123
124
//------------------------------------------------------------------------------------------------
126
void
Trim()
127
{
128
foreach
(
int
i,
string
entry :
this
)
129
{
130
entry.TrimInPlace();
131
Set
(i, entry);
132
}
133
}
134
}
SCR_StringArray
Definition
SCR_StringArray.c:4
SCR_StringHelper
Definition
SCR_StringHelper.c:2
SCR_StringHelper::IsEmptyOrWhiteSpace
static bool IsEmptyOrWhiteSpace(string input)
Definition
SCR_StringHelper.c:594
SCR_StringHelper::Join
static string Join(string separator, notnull array< string > pieces, bool joinEmptyEntries=true)
Definition
SCR_StringHelper.c:641
Set
proto void Set(int n, T value)
Sets n-th element to given value.
RemoveOrdered
proto native void RemoveOrdered(int index)
IsEmpty
proto native bool IsEmpty()
Get
proto T Get(int n)
Count
TypeID handle64 Count()
scripts
Game
Helpers
Types
SCR_StringArray.c
Generated by
1.17.0