API Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
String.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Base
28File: String
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/Buffer.h>
35#include <NDEVR/StringStream.h>
36#include <cmath>
37namespace NDEVR
38{
39 class String : public Buffer<char, uint04, ObjectAllocator<true>, BufferAllocator<char, uint04, true>>
40 {
41 public:
43 NDEVR_BASE_API String(const String& string);
44 NDEVR_BASE_API String(String&& string) noexcept;
45
46 template<std::size_t N>
47 String(const char (&string)[N])
48 : Buffer(string, str_len(string))
49 {}
50 template<std::size_t N>
51 String(const wchar(&string)[N])
52 {
53 addUnicodeAsUTF8(string);
54 }
55 String(const char* string)
56 : Buffer(string, string == nullptr ? 0 : str_len(string))
57 {}
58 NDEVR_BASE_API String(const char* const string, uint04 size);
59
60 String(uint04 size, const char& value)
61 : Buffer(size, value)
62 {}
63
64 template<class t_type>
65 explicit String(const t_type& value)
66 {
68 }
69
70 // ----------------------------------------------------------------------------
71 // Tests if this starts with the specified prefix.
72 // ----------------------------------------------------------------------------
73 NDEVR_BASE_API bool beginsWith(const String& s, bool ignore_case = false) const;
74
75 // ----------------------------------------------------------------------------
76 // Tests if this ends with the specified postfix.
77 // ----------------------------------------------------------------------------
78 NDEVR_BASE_API bool endsWith(const String& s, bool ignore_case = false) const;
79
80 // ----------------------------------------------------------------------------
81 // Given a substtring specified by the input, returns the first index of that
82 // string, if it exists. If it does not exist, Math::getNull<uint04>() is
83 // returned. start_index specifies an index to begin checking at. All values
84 // prior to start_index will not be checked.
85 // ----------------------------------------------------------------------------
86 NDEVR_BASE_API uint04 indexOf(const String& sub_string, bool ignore_case = false, uint04 start_index = 0) const;
87 NDEVR_BASE_API uint04 indexOf(const char& sub_string) const { return Buffer::indexOf(sub_string); }
88 NDEVR_BASE_API uint04 indexOf(const char& sub_string, uint04 start_pos) const { return Buffer::indexOf(sub_string, start_pos); }
89 NDEVR_BASE_API uint04 indexOf(const char& sub_string, uint04 start_pos, uint04 size) const { return Buffer::indexOf(sub_string, start_pos, size); }
90 NDEVR_BASE_API uint04 indexOf(const char* sub_string, bool ignore_case = false, uint04 start_index = 0) const;
91 NDEVR_BASE_API uint04 indexOf(const char* sub_string, bool ignore_case, uint04 start_index, uint04 size) const;
92 NDEVR_BASE_API uint04 indexOf(const char* sub_string, char escape_char, bool ignore_case = false, uint04 start_index = 0) const;
93 NDEVR_BASE_API uint04 lastIndexOf(const char* sub_string, bool ignore_case = false) const;
94 NDEVR_BASE_API uint04 lastIndexOf(const char value, bool ignore_case = false) const;
95 NDEVR_BASE_API bool hasSubString(const String& sub_string, bool ignore_case = false) const;
96 NDEVR_BASE_API bool hasSubString(const char* sub_string, bool ignore_case = false) const;
97
98 NDEVR_BASE_API String& replace(const String& sub_string, const String& replace_sub_string, bool ignore_case = false);
99 NDEVR_BASE_API String& replace(const Buffer<String, uint04, ObjectAllocator<false>>& sub_string, const Buffer<String, uint04, ObjectAllocator<false>>& replace_sub_string, bool ignore_case = false);
100
101 NDEVR_BASE_API Buffer<String, uint04, ObjectAllocator<false>> splitString(char delimiter, bool preserve_empty = true) const;
102 NDEVR_BASE_API Buffer<String, uint04, ObjectAllocator<false>> splitString(const Buffer<char>& delimiter, bool preserve_empty = true) const;
103 NDEVR_BASE_API void splitString(char delimiter, Buffer<String, uint04, ObjectAllocator<false>>& strings, bool preserve_empty = true) const;
104 NDEVR_BASE_API void splitString(const Buffer<char>& delimiter, Buffer<String, uint04, ObjectAllocator<false>>& strings, bool preserve_empty = true) const;
105
107
109 NDEVR_BASE_API const char* c_str() const;
110
111 NDEVR_BASE_API bool isSameNoCase(const String& s) const;
112 NDEVR_BASE_API bool matchesWildcard(const String& pattern) const;
113 NDEVR_BASE_API String& append(const String& string);
114 NDEVR_BASE_API uint08 hash() const;
117
118 NDEVR_BASE_API static bool AlphaNumericCompare(const String& left, const String& right);
119
120 template<class t_type>
121 static TranslatedString DisplayString(const t_type& value);
122
123 static constexpr uint04 str_len(const char* value)
124 {
125 const char* n_value = value;
126 for (; *n_value; ++n_value)
127 {}
128 return cast<uint04>(n_value - value);
129 }
130 static constexpr uint04 str_len(const wchar* value)
131 {
132 uint04 count = 0;
133 const wchar* n_value = value;
134 for (; *n_value; ++n_value)
135 {
136 if (*n_value < 0x80)
137 {
138 count += 1;
139 }
140 else if (*n_value < 0x800)
141 {
142 count += 2;
143 }
144 else
145 {
146 uint04 cp = (*n_value << 16);
147 ++n_value;
148 cp += *n_value;
149 if (cp < 0x10000)
150 count += 3;
151 else
152 count += 4;
153 }
154 }
155 return count;
156 }
157#if _MSC_VER
158#pragma warning( disable : 4307)
159#endif
160 static constexpr uint08 hash(const char* value)
161 {
162 uint08 hash_value = 5381U;
163 for (const char* n_value = value; *n_value; n_value++)
164 {
165 hash_value = ((hash_value << 5) + hash_value) + cast<uint08>(*n_value);
166 }
167 return hash_value;
168 }
169 operator uint08() const
170 {
171 return hash();
172 }
173 operator uint04() const
174 {
176 }
177 size_t operator()() const
178 {
179 return cast<size_t>(hash());
180 }
181 NDEVR_BASE_API String substr(uint04 start) const;
183 NDEVR_BASE_API static bool IsWhiteSpace(char s);
185 NDEVR_BASE_API String& addWhiteSpace(uint04 desired_string_size, uint04 desired_right_alignment_location = 0, char whitespace = ' ');
187 NDEVR_BASE_API String& formatNumberString(bool add_comma, uint04 decimals);
188 NDEVR_BASE_API String& formatNumberString(bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, char decimal = '.', char comma = ',');
189 NDEVR_BASE_API static String NumberString(fltp08 value, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, char decimal = '.', char comma = ',');
191
192 NDEVR_BASE_API String& removeNonAlphaNumeric(bool remove_tab = true, bool remove_space = true, bool remove_new_line = true, bool remove_r = true, bool remove_numbers = false);
195 NDEVR_BASE_API String insertNewLines(uint04 max_line_size) const;
196
198
200
202
203 NDEVR_BASE_API bool isNumeric() const;
206 NDEVR_BASE_API static String toHex(uint01 value);
207 NDEVR_BASE_API static String toHex(char value);
208 NDEVR_BASE_API static wchar UTF8toUnicode(const char* utf8, uint04& advance);
209 NDEVR_BASE_API void addUnicodeAsUTF8(const wchar* unicode);
210 NDEVR_BASE_API bool addUnicodeCharAsUTF8(const wchar* unicode, uint04& advance);
211 NDEVR_BASE_API static String UnicodetoUTF8(const wchar* unicode, uint04& advance);
212
213 void addWChar(const wchar& object);
214
215 template<class t_object>
216 static typename std::enable_if<ObjectInfo<t_object>::Integer, String>::type toHex(t_object value)
217 {
218 String hex;
219 uint04 byte_size = cast<uint04>(sizeof(t_object));
220 hex.setSize(2 * byte_size);
221 for (uint04 i = 0; i < byte_size; i++)
222 {
223 String local_hex = toHex(rcast<uint01>(value % 256));
224 hex[2 * (byte_size - i - 1) + 0] = local_hex[0];
225 hex[2 * (byte_size - i - 1) + 1] = local_hex[1];
226 value /= cast<t_object>(256);
227 }
228 return hex;
229 }
230 template<class t_object, class t_allocator, class t_buff>
232 {
233 String hex;
234 hex.ensureCapacity(values.size() * 2 * sizeof(t_object));
235 for (uint04 i = 0; i < values.size(); i++)
236 {
237 hex += toHex(values[i]);
238 }
239 return hex;
240 }
241 static String toHex(const String& values)
242 {
243 String hex;
244 hex.ensureCapacity(values.size());
245 for (uint04 i = 0; i < values.size(); i++)
246 {
247 hex += toHex(values[i]);
248 }
249 return hex;
250 }
251 template<uint01 t_size, class t_type>
252 static String toHex(const Vector<t_size, t_type>& values)
253 {
254 String hex;
255 hex.ensureCapacity(cast<uint04>(t_size) * 2 * sizeof(t_type));
256 for (uint01 i = 0; i < t_size; i++)
257 {
258 hex += toHex(values[i]);
259 }
260 return hex;
261 }
262
263 String& operator=(const String& value)
264 {
265 Buffer::operator=(value);
266 return *this;
267 }
268
269 String& operator=(String&& value) noexcept
270 {
271 Buffer::operator=(std::move(value));
272 return *this;
273 }
274 bool operator==(const String& value) const
275 {
276 if(value.size() != size())
277 return false;
278 for(uint04 i = 0; i < size(); i++)
279 {
280 if(value[i] != (*this)[i])
281 return false;
282 }
283 return true;
284 }
285 bool operator==(const char* const value) const
286 {
287 for(uint04 i = 0; i < size(); i++)
288 {
289 if(value[i] != (*this)[i])
290 return false;
291 }
292 return value[size()] == '\0';//check if strings are same size
293 }
294 template<std::size_t t_size>
295 bool operator==(const char(&string)[t_size])
296 {
297 if(t_size <= size())
298 return false;
299 if(string[size()] != '\0')
300 return false;
301 return memcmp(string, begin(), sizeof(char) * size()) == 0;
302 }
303
304 bool operator!=(const char* const value) const
305 {
306 for(uint04 i = 0; i < size(); i++)
307 {
308 if(value[i] != (*this)[i])
309 return true;
310 }
311 return value[size()] != '\0';//check if strings are same size
312 }
313 template<std::size_t t_size>
314 bool operator!=(const char(&string)[t_size])
315 {
316 if(t_size <= size())
317 return true;
318 if(string[size()] != '\0')
319 return true;
320 return memcmp(string, begin(), sizeof(char) * size()) != 0;
321 }
322 bool operator!=(const String& value) const
323 {
324 if(value.size() != size())
325 return true;
326 for(uint04 i = 0; i < size(); i++)
327 {
328 if(value[i] != (*this)[i])
329 return true;
330 }
331 return false;//check if strings are same size
332 }
333 template <class t_type>
334 t_type getAs() const
335 {
336 t_type value;
338 return value;
339 }
340 NDEVR_BASE_API bool operator<(const String& value) const;
341 NDEVR_BASE_API bool operator>(const String& value) const;
342 };
344 {
345 UTF8Iterator(const String& string);
346 wchar nextChar();
347 protected:
350 };
351
352 inline String operator+(const String& string_a, const String& string_b)
353 {
354 String s;
355 s.ensureCapacity(string_a.size() + string_b.size());
356 s.addAll(string_a);
357 s.addAll(string_b);
358 return s;
359 }
360 inline String operator+(String&& v1, const String& v2)
361 {
362 v1.addAll(v2);
363 return std::move(v1);
364 }
365 inline String operator+(String&& v1, String&& v2)
366 {
367 v1.addAll(v2);
368 return std::move(v1);
369 }
370
371 inline String operator+(String&& v1, const char*& v2)
372 {
374 return std::move(v1);
375 }
376
377 inline String operator+(String&& v1, const char& v2)
378 {
379 v1.add(v2);
380 return std::move(v1);
381 }
382
383 inline String operator+(const String& v1, const char& v2)
384 {
385 String s(v1);
386 s.add(v2);
387 return s;
388 }
389
390 inline String operator+(const char*& v1, const String& v2)
391 {
392 String s;
394 s.ensureCapacity(v2.size() + size);
395 s.addAll(v1, size);
396 s.addAll(v2);
397 return s;
398 }
399
400 template<size_t t_size>
401 inline String operator+(String&& v1, const char(&v2)[t_size])
402 {
404 return std::move(v1);
405 }
406 template<size_t t_size>
407 inline String operator+(const String& v1, const char(&v2)[t_size])
408 {
409 String combined(v1);
410 combined.addAll(v2, cast<uint04>(String::str_len(v2)));
411 return combined;
412 }
413
414 inline String& operator+=(String& string, const String& value)
415 {
416 string.addAll(value);
417 return string;
418 }
419 template<size_t t_size>
420 inline String& operator+=(String& v1, const char(&v2)[t_size])
421 {
422 v1.addAll(v2);
423 return v1;
424 }
425
426 template<size_t t_size>
427 inline String operator+(const char(&v1)[t_size], const String& v2)
428 {
429 String s;
430 uint04 size = String::str_len(v1);
431 s.ensureCapacity(v2.size() + size);
432 s.addAll(v1, size);
433 s.addAll(v2);
434 return s;
435 }
436 template<size_t t_size>
437 inline bool operator==(const char(&v1)[t_size], const String& v2)
438 {
439 return v2 == v1;
440 }
441 inline bool operator==(const char*& v1, const String& v2)
442 {
443 return v2 == v1;
444 }
445 template<size_t t_size>
446 inline String operator+(const char(&v1)[t_size], String&& v2)
447 {
448 String s;
449 uint04 size = String::str_len(v1);
450 s.ensureCapacity(v2.size() + size);
451 s.addAll((char*)v1, size);
452 s.addAll(v2);
453 return s;
454 }
455 template<class t_to>
456 constexpr t_to cast(const String& value)
457 {
458 return static_cast<t_to>(value.getAs<t_to>());
459 }
460 template<>
461 struct ObjectInfo<String, false, true>
462 {
463 static const uint01 Dimensions = 0;
464 static const bool Vector = false;
465 static const bool Buffer = true;
466 static const bool Primitive = false;
467 static const bool Pointer = false;
468 static const bool Unsigned = false;
469 static const bool Float = false;
470 static const bool Integer = false;
471 static const bool Number = false;
472 static const bool Enum = false;
473 static const bool String = true;
474 static const bool Color = false;
475 static const bool Boolean = false;
477 };
478
479 template<class t_type_b>
480 void assign(String& a, const t_type_b& b)
481 {
482 a = String(b);
483 }
484 template<class t_type_a>
485 void assign(t_type_a a, const String& b)
486 {
487 a = b.getAs<t_type_a>();
488 }
489 template<> inline const String Constant<String>::NaN = String();
490 template<>
491 constexpr bool isNaN(const String& value)
492 {
493 return value.size() == 0;
494 }
495
496};
497
498
499namespace std//Define things to allow use within std libs
500{
501 template <>
502 struct hash<NDEVR::String>
503 {
504 std::size_t operator()(const NDEVR::String& s) const noexcept
505 {
506 return static_cast<size_t>(s.hash());
507 }
508 };
509 NDEVR_BASE_API istream& operator>>(istream& in, NDEVR::String& string);
510 NDEVR_BASE_API ostream& operator<<(ostream& in, const NDEVR::String& string);
511};
#define NDEVR_BASE_API
Definition DLLInfo.h:78
#define utf8(str)
Definition UnitDefinitions.cpp:8
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Buffer & operator=(const Buffer &buffer)
Definition Buffer.hpp:1773
void add(t_type &&object)
Definition Buffer.hpp:199
void addAll(const Buffer< t_type, t_other_index_type, t_other_memory_allocator, t_other_memory_manager > &buffer)
Definition Buffer.hpp:248
void setSize(t_index_type new_size)
Definition Buffer.hpp:1413
t_index_type indexOf(const t_type &element) const
Definition Buffer.hpp:905
void ensureCapacity(t_index_type new_capacity, bool ensure_not_greater=false, bool ensure_not_less=true)
Definition Buffer.hpp:803
Definition Color.h:36
Definition MemoryManager.h:283
Definition Pointer.hpp:62
Definition String.h:40
String(uint04 size, const char &value)
Definition String.h:60
static NDEVR_BASE_API String UnicodetoUTF8(const wchar *unicode, uint04 &advance)
Definition String.cpp:1292
NDEVR_BASE_API const char * c_str() const
Definition String.cpp:490
NDEVR_BASE_API uint08 hashLower() const
Definition String.cpp:513
NDEVR_BASE_API String predictNextStringIncrement() const
Definition String.cpp:1061
NDEVR_BASE_API bool operator<(const String &value) const
Definition String.cpp:1314
NDEVR_BASE_API bool hasSubString(const String &sub_string, bool ignore_case=false) const
Definition String.cpp:331
NDEVR_BASE_API uint04 fromHex() const
Definition String.cpp:1146
NDEVR_BASE_API String & addWhiteSpace(uint04 desired_string_size, uint04 desired_right_alignment_location=0, char whitespace=' ')
Definition String.cpp:583
NDEVR_BASE_API String & removeNonAlphaNumeric(bool remove_tab=true, bool remove_space=true, bool remove_new_line=true, bool remove_r=true, bool remove_numbers=false)
Definition String.cpp:959
NDEVR_BASE_API bool isNumeric() const
Definition String.cpp:1122
NDEVR_BASE_API void splitString(char delimiter, Buffer< String, uint04, ObjectAllocator< false > > &strings, bool preserve_empty=true) const
static constexpr uint08 hash(const char *value)
Definition String.h:160
bool operator==(const char *const value) const
Definition String.h:285
static constexpr uint04 str_len(const char *value)
Definition String.h:123
String(const t_type &value)
Definition String.h:65
NDEVR_BASE_API String shortenString(uint04 size) const
Definition String.cpp:997
static NDEVR_BASE_API bool IsWhiteSpace(char s)
Definition String.cpp:564
static NDEVR_BASE_API wchar UTF8toUnicode(const char *utf8, uint04 &advance)
Definition String.cpp:1177
size_t operator()() const
Definition String.h:177
NDEVR_BASE_API uint04 indexOf(const char &sub_string, uint04 start_pos, uint04 size) const
Definition String.h:89
String & operator=(String &&value) noexcept
Definition String.h:269
NDEVR_BASE_API Buffer< String, uint04, ObjectAllocator< false > > splitStringLength(uint04 max_chars_per_line) const
Definition String.cpp:72
static NDEVR_BASE_API String ConvertToCharString(uint04 number)
Definition String.cpp:1133
NDEVR_BASE_API bool isSameNoCase(const String &s) const
Definition String.cpp:471
static String toHex(const String &values)
Definition String.h:241
bool operator==(const String &value) const
Definition String.h:274
NDEVR_BASE_API String()
Definition String.cpp:143
static String toHex(const Buffer< t_object, t_allocator, t_buff > &values)
Definition String.h:231
bool operator!=(const String &value) const
Definition String.h:322
void addWChar(const wchar &object)
Definition String.cpp:1299
static std::enable_if< ObjectInfo< t_object >::Integer, String >::type toHex(t_object value)
Definition String.h:216
static NDEVR_BASE_API String toHex(uint01 value)
Definition String.cpp:1150
bool operator==(const char(&string)[t_size])
Definition String.h:295
NDEVR_BASE_API uint04 indexOf(const char &sub_string, uint04 start_pos) const
Definition String.h:88
String(const char *string)
Definition String.h:55
static constexpr uint04 str_len(const wchar *value)
Definition String.h:130
NDEVR_BASE_API String & trimWhiteSpace()
Definition String.cpp:569
NDEVR_BASE_API String substr(uint04 start) const
Definition String.cpp:551
t_type getAs() const
Definition String.h:334
static String toHex(const Vector< t_size, t_type > &values)
Definition String.h:252
NDEVR_BASE_API String & replace(const String &sub_string, const String &replace_sub_string, bool ignore_case=false)
Definition String.cpp:343
String(const char(&string)[N])
Definition String.h:47
NDEVR_BASE_API String & formatNumberString(uint04 decimals)
Definition String.cpp:591
NDEVR_BASE_API uint04 indexOf(const String &sub_string, bool ignore_case=false, uint04 start_index=0) const
Definition String.cpp:208
NDEVR_BASE_API String insertNewLines(uint04 max_line_size) const
Definition String.cpp:1018
NDEVR_BASE_API Buffer< String, uint04, ObjectAllocator< false > > splitString(char delimiter, bool preserve_empty=true) const
Definition String.cpp:57
NDEVR_BASE_API bool addUnicodeCharAsUTF8(const wchar *unicode, uint04 &advance)
Definition String.cpp:1248
NDEVR_BASE_API void addUnicodeAsUTF8(const wchar *unicode)
Definition String.cpp:1235
static NDEVR_BASE_API String NumberString(fltp08 value, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, char decimal='.', char comma=',')
Definition String.cpp:601
String(const wchar(&string)[N])
Definition String.h:51
String & operator=(const String &value)
Definition String.h:263
NDEVR_BASE_API String formatTitleString() const
Definition String.cpp:923
NDEVR_BASE_API String & removeNonNumeric()
Definition String.cpp:981
NDEVR_BASE_API String toUpper() const
Definition String.cpp:1099
NDEVR_BASE_API uint08 hashUpper() const
Definition String.cpp:502
static NDEVR_BASE_API bool AlphaNumericCompare(const String &left, const String &right)
Definition String.cpp:521
bool operator!=(const char *const value) const
Definition String.h:304
NDEVR_BASE_API bool matchesWildcard(const String &pattern) const
Definition String.cpp:435
NDEVR_BASE_API String & append(const String &string)
Definition String.cpp:484
static TranslatedString DisplayString(const t_type &value)
Definition TranslatedString.h:50
bool operator!=(const char(&string)[t_size])
Definition String.h:314
NDEVR_BASE_API uint04 indexOf(const char &sub_string) const
Definition String.h:87
NDEVR_BASE_API uint08 hash() const
Definition String.cpp:494
NDEVR_BASE_API bool operator>(const String &value) const
Definition String.cpp:1326
NDEVR_BASE_API String toLower() const
Definition String.cpp:1110
NDEVR_BASE_API uint04 lastIndexOf(const char *sub_string, bool ignore_case=false) const
Definition String.cpp:296
NDEVR_BASE_API bool endsWith(const String &s, bool ignore_case=false) const
Definition String.cpp:389
NDEVR_BASE_API bool beginsWith(const String &s, bool ignore_case=false) const
Definition String.cpp:412
static void toString(const t_type &value, String &string)
static void fromString(const String &string, t_type &value)
Definition TranslatedString.h:9
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
Definition ACIColor.h:37
bool operator==(const char(&v1)[t_size], const String &v2)
Definition String.h:437
wchar_t wchar
Definition BaseValues.hpp:184
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:98
constexpr t_to rcast(t_from value)
Definition BaseValues.hpp:427
String operator+(const String &string_a, const String &string_b)
Definition String.h:352
String & operator+=(String &string, const String &value)
Definition String.h:414
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer -Can represent exact integer values 0 thro...
Definition BaseValues.hpp:132
void assign(String &a, const t_type_b &b)
Definition String.h:480
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:514
constexpr bool isNaN(const t_type &value)
Query if 'value' is valid or invalid.
Definition BaseFunctions.hpp:200
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition File.h:213
NDEVR_BASE_API ostream & operator<<(ostream &in, const NDEVR::String &string)
NDEVR_BASE_API istream & operator>>(istream &in, NDEVR::String &string)
Definition BaseValues.hpp:272
static constexpr ObjectInfo< char, false, false > VectorSub()
Definition String.h:476
Information about the object.
Definition ObjectInfo.h:56
Definition String.h:344
const String & string
Definition String.h:348
uint04 m_position
Definition String.h:349
std::size_t operator()(const NDEVR::String &s) const noexcept
Definition String.h:504