Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
CString.cpp
Go to the documentation of this file.
1
//// Copyright Epic Games, Inc. All Rights Reserved.
2
//
3
//#include "Misc/CString.h"
4
//#include "Containers/StringConv.h"
5
//#include "Internationalization/Text.h"
6
//
7
//// 4 lines of 64 chars each, plus a null terminator
8
//template <>
9
//const ANSICHAR TCStringSpcHelper<ANSICHAR>::SpcArray[MAX_SPACES + 1] =
10
//" "
11
//" "
12
//" "
13
//" ";
14
//
15
//template <>
16
//const WIDECHAR TCStringSpcHelper<WIDECHAR>::SpcArray[MAX_SPACES + 1] = WIDETEXT(
17
// " "
18
// " "
19
// " "
20
// " ");
21
//
22
//template <>
23
//const UTF8CHAR TCStringSpcHelper<UTF8CHAR>::SpcArray[MAX_SPACES + 1] = {
24
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
25
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
26
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
27
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
28
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
29
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
30
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
31
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
32
//
33
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
34
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
35
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
36
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
37
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
38
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
39
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
40
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
41
//
42
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
43
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
44
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
45
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
46
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
47
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
48
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
49
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
50
//
51
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
52
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
53
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
54
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
55
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
56
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
57
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '),
58
// UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT(' '), UTF8TEXT('\0')
59
//};
60
//
61
//template <>
62
//const ANSICHAR TCStringSpcHelper<ANSICHAR>::TabArray[MAX_TABS + 1] =
63
//"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
64
//"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
65
//"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
66
//"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
67
//
68
//template <>
69
//const WIDECHAR TCStringSpcHelper<WIDECHAR>::TabArray[MAX_TABS + 1] = WIDETEXT(
70
// "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
71
// "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
72
// "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
73
// "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t");
74
//
75
//template <>
76
//const UTF8CHAR TCStringSpcHelper<UTF8CHAR>::TabArray[MAX_TABS + 1] = {
77
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
78
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
79
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
80
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
81
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
82
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
83
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
84
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
85
//
86
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
87
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
88
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
89
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
90
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
91
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
92
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
93
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
94
//
95
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
96
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
97
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
98
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
99
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
100
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
101
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
102
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
103
//
104
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
105
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
106
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
107
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
108
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
109
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
110
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'),
111
// UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\t'), UTF8TEXT('\0')
112
//};
113
//
114
//bool FToBoolHelper::FromCStringAnsi(const ANSICHAR* String)
115
//{
116
//#if PLATFORM_TCHAR_IS_UTF8CHAR
117
// return FToBoolHelper::FromCStringUtf8(StringCast<UTF8CHAR>(String).Get());
118
//#else
119
// return FToBoolHelper::FromCStringWide(StringCast<WIDECHAR>(String).Get());
120
//#endif
121
//}
122
//
123
//bool FToBoolHelper::FromCStringWide(const WIDECHAR* String)
124
//{
125
//#if PLATFORM_TCHAR_IS_UTF8CHAR
126
// return FToBoolHelper::FromCStringUtf8(StringCast<UTF8CHAR>(String).Get());
127
//#else
128
// const FCoreTexts& CoreTexts = FCoreTexts::Get();
129
//
130
// if (
131
// FCStringWide::Stricmp(String, TEXT("True")) == 0
132
// || FCStringWide::Stricmp(String, TEXT("Yes")) == 0
133
// || FCStringWide::Stricmp(String, TEXT("On")) == 0
134
// || FCStringWide::Stricmp(String, *(CoreTexts.True.ToString())) == 0
135
// || FCStringWide::Stricmp(String, *(CoreTexts.Yes.ToString())) == 0)
136
// {
137
// return true;
138
// }
139
// else if (
140
// FCStringWide::Stricmp(String, TEXT("False")) == 0
141
// || FCStringWide::Stricmp(String, TEXT("No")) == 0
142
// || FCStringWide::Stricmp(String, TEXT("Off")) == 0
143
// || FCStringWide::Stricmp(String, *(CoreTexts.False.ToString())) == 0
144
// || FCStringWide::Stricmp(String, *(CoreTexts.No.ToString())) == 0)
145
// {
146
// return false;
147
// }
148
// else
149
// {
150
// return FCStringWide::Atoi(String) ? true : false;
151
// }
152
//#endif
153
//}
154
//
155
//bool FToBoolHelper::FromCStringUtf8(const UTF8CHAR* String)
156
//{
157
//#if PLATFORM_TCHAR_IS_UTF8CHAR
158
// const FCoreTexts& CoreTexts = FCoreTexts::Get();
159
//
160
// if (
161
// FCStringUtf8::Stricmp(String, TEXT("True")) == 0
162
// || FCStringUtf8::Stricmp(String, TEXT("Yes")) == 0
163
// || FCStringUtf8::Stricmp(String, TEXT("On")) == 0
164
// || FCStringUtf8::Stricmp(String, *(CoreTexts.True.ToString())) == 0
165
// || FCStringUtf8::Stricmp(String, *(CoreTexts.Yes.ToString())) == 0)
166
// {
167
// return true;
168
// }
169
// else if (
170
// FCStringUtf8::Stricmp(String, TEXT("False")) == 0
171
// || FCStringUtf8::Stricmp(String, TEXT("No")) == 0
172
// || FCStringUtf8::Stricmp(String, TEXT("Off")) == 0
173
// || FCStringUtf8::Stricmp(String, *(CoreTexts.False.ToString())) == 0
174
// || FCStringUtf8::Stricmp(String, *(CoreTexts.No.ToString())) == 0)
175
// {
176
// return false;
177
// }
178
// else
179
// {
180
// return FCStringUtf8::Atoi(String) ? true : false;
181
// }
182
//#else
183
// return FToBoolHelper::FromCStringWide(StringCast<WIDECHAR>(String).Get());
184
//#endif
185
//}
Downloads
ArkServerAPI_NEW
ASA
AsaApi
AsaApi
Core
Public
API
UE
Misc
CString.cpp
Generated by
1.10.0