arduino-audio-tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
StrView.h
1#pragma once
2
3#include <stdio.h>
4#include <string.h>
5#include <stdlib.h>
6#include "AudioTools/CoreAudio/AudioLogger.h"
7
16namespace audio_tools {
17
28class StrView {
29 public:
30 StrView() = default;
31
33 StrView(const char* chars) {
34 if (chars != nullptr) {
35 int len = strlen(chars);
36 set((char*)chars, len, len, true);
37 } else {
38 this->is_const = true;
39 clear();
40 }
41 }
42
44 StrView(char chars[], int maxlen, int len = 0) { set(chars, maxlen, len, false); }
45
47 virtual void set(const char* alt) {
48 if (alt == nullptr) {
49 this->len = 0;
50 } else {
51 int new_len = strlen(alt);
52 grow(new_len);
53 this->len = new_len;
54 if (this->isConst()) {
56 this->maxlen = this->len;
57 this->chars = (char*)alt;
58 } else {
60 strncpy(this->chars, alt, this->maxlen);
61 this->chars[len] = 0;
62 }
63 }
64 }
66 virtual void set(const StrView& alt) {
67 grow(alt.len);
68 this->len = alt.len;
69
70 if (this->isConst()) {
72 this->chars = alt.chars;
73 } else {
75 strncpy(this->chars, alt.chars, this->maxlen);
76 this->chars[len] = 0;
77 }
78 }
79
80 virtual void set(const char c) {
81 clear();
82 add(c);
83 }
84
85 virtual void set(int value) {
86 clear();
87 add(value);
88 }
89
90 virtual void set(double value, int precision = 2, int withd = 0) {
91 clear();
92 add(value);
93 }
94
95 virtual void swap(StrView& str) {
96 char* cpy_chars = chars;
97 ;
98 bool cpy_is_const = is_const;
99 int cpy_len = len;
100 int cpy_maxlen = maxlen;
101
102 chars = str.chars;
103 is_const = str.is_const;
104 len = str.len;
105 maxlen = str.maxlen;
106
107 str.chars = cpy_chars;
108 str.is_const = cpy_is_const;
109 str.len = cpy_len;
110 str.maxlen = cpy_maxlen;
111 }
112
114 virtual void set(char chars[], int maxlen, int len = 0,
115 bool isConst = false) {
116 this->chars = chars;
117 this->maxlen = maxlen;
118 this->len = len;
119 this->is_const = isConst;
120 if (len == 0 && !isConst) {
121 this->chars[0] = 0;
122 }
123 }
124
126 virtual void add(int value) {
127 if (!this->isConst()) {
128 grow(this->length() + 11);
129 snprintf(this->chars + len, 10, "%d", value);
130 len = strlen(chars);
131 }
132 }
133
135 virtual void add(double value, int precision = 2, int withd = 0) {
136 if (!this->isConst()) {
137 grow(this->length() + 20);
138 floatToString(this->chars + len, value, precision, withd);
139 len = strlen(chars);
140 }
141 }
142
144 virtual void add(const char* append) {
145 if (!isConst() && append != nullptr) {
146 int append_len = strlen(append);
147 grow(this->length() + append_len + 1);
148 int n = (len + append_len) < maxlen - 1 ? append_len : maxlen - len - 1;
149 strncat(chars, append, n);
150 chars[len + n] = 0;
151 len = strlen(chars);
152 }
153 }
154
156 virtual void add(const char c) {
157 if (!isConst() && len < maxlen - 1) {
158 grow(this->length() + 1);
159 chars[len] = c;
160 chars[++len] = 0;
161 }
162 }
163
165 virtual bool equals(const char* str) {
166 if (str == nullptr) return false;
167 return strcmp(this->chars, str) == 0;
168 }
169
171 virtual bool startsWith(const char* str) {
172 if (str == nullptr) return false;
173 int len = strlen(str);
174 return strncmp(this->chars, str, len) == 0;
175 }
176
178 virtual bool endsWith(const char* str) {
179 if (str == nullptr) return false;
180 int endlen = strlen(str);
181 return strncmp(this->chars + (len - endlen), str, endlen) == 0;
182 }
183
185 virtual bool endsWithIgnoreCase(const char* str) {
186 if (str == nullptr) return false;
187 int endlen = strlen(str);
188 return strncmp_i(this->chars + (len - endlen), str, endlen) == 0;
189 }
190
193 virtual bool matches(const char* pattern) {
196 int wildcard = 0;
197 const char* line = this->chars;
198
199 const char* last_pattern_start = 0;
200 const char* last_line_start = 0;
201 do {
202 if (*pattern == *line) {
203 if (wildcard == 1) last_line_start = line + 1;
204
205 line++;
206 pattern++;
207 wildcard = 0;
208 } else if (*pattern == '?') {
209 if (*(line) == '\0')
210 return 0;
211 if (wildcard == 1) last_line_start = line + 1;
212 line++;
213 pattern++;
214 wildcard = 0;
215 } else if (*pattern == '*') {
216 if (*(pattern + 1) == '\0') {
217 return 1;
218 }
219
220 last_pattern_start = pattern;
221 // last_line_start = line + 1;
222 wildcard = 1;
223
224 pattern++;
225 } else if (wildcard) {
226 if (*line == *pattern) {
227 wildcard = 0;
228 line++;
229 pattern++;
230 last_line_start = line + 1;
231 } else {
232 line++;
233 }
234 } else {
235 if ((*pattern) == '\0' && (*line) == '\0')
236 return 1;
237 else {
238 if (last_pattern_start != 0)
239 {
240 pattern = last_pattern_start;
241 line = last_line_start;
242 last_line_start = 0;
243 } else {
244 return false;
245 }
246 }
247 }
248
249 } while (*line);
250
251 if (*pattern == '\0') {
252 return true;
253 } else {
254 return false;
255 }
256 }
257
260 virtual int indexOf(const char c, int start = 0) {
261 for (int j = start; j < len; j++) {
262 if (c == chars[j]) {
263 return j;
264 }
265 }
266 return -1;
267 }
268
270 virtual int nIndexOf(const char c, int n){
271 int result = -1;
272 for (int j=0; j < n; j++){
273 result = indexOf(c, result + 1);
274 if (result < 0) break;
275 }
276 return result;
277 }
278
280 virtual bool contains(const char* str) { return indexOf(str) != -1; }
281
284 virtual int indexOf(const char* cont, int start = 0) {
285 if (chars == nullptr || cont == nullptr) return -1;
286 int contLen = strlen(cont);
287 for (int j = start; j < len; j++) {
288 char* pt = chars + j;
289 if (strncmp(pt, cont, contLen) == 0) {
290 return j;
291 }
292 }
293 return -1;
294 }
295
297 virtual int lastIndexOf(const char* cont) {
298 if (cont == nullptr) return -1;
299 int contLen = strlen(cont);
300 for (int j = (len - contLen); j >= 0; j--) {
301 if (strncmp(cont, chars + j, contLen) == 0) {
302 return j;
303 }
304 }
305 return -1;
306 }
307
309 virtual int nIndexOf(const char* cont, int n){
310 int result = -1;
311 for (int j=0; j < n; j++){
312 result = indexOf(cont, result + 1);
313 if (result < 0) break;
314 }
315 return result;
316 }
317
319 virtual void operator=(const char* str) { set(str); }
320
322 virtual void operator=(char* str) { set(str); }
323
325 virtual void operator=(char c) { set(c); }
326
328 virtual void operator=(double val) { set(val); }
329
331 virtual void operator=(int value) { set(value); }
332
334 virtual void operator<<(int n) {
335 if (isConst()) {
336 this->chars += n;
337 this->len -= n;
338 } else {
339 memmove(this->chars, this->chars + n, len + 1);
340 }
341 }
342
343 virtual char operator[](int index) { return chars[index]; }
344
346 virtual void operator+=(const char* str) { add(str); }
347
349 virtual void operator+=(int value) { add(value); }
350
352 virtual void operator+=(double value) { add(value); }
353
355 virtual void operator+=(const char value) { add(value); }
356
358 virtual bool operator==(const StrView& alt) const {
359 if (this->len != alt.len) return false;
360 return strncmp(this->chars, alt.chars, this->len) == 0;
361 }
362
364 virtual bool operator==(const char* alt) const {
365 return strncmp(this->chars, alt, this->len) == 0;
366 }
367
369 virtual bool operator!=(const StrView& alt) const {
370 return strncmp(this->chars, alt.chars, this->len) != 0;
371 }
372
374 virtual bool operator!=(const char* alt) const {
375 return strncmp(this->chars, alt, this->len) != 0;
376 }
377
379 virtual const char* c_str() { return chars; }
380
383 virtual int length() { return len; }
384
386 virtual bool isEmpty() { return len == 0; }
387
389 virtual int maxLength() { return maxlen; }
390
392 virtual bool replace(const char* toReplace, const char* replaced) {
393 bool result = false;
394 if (toReplace == nullptr || replaced == nullptr) {
395 return result;
396 }
397 if (!isConst()) {
398 int pos = indexOf(toReplace);
399 int old_len = length();
400 int insert_len = 0;
401 if (pos >= 0) {
402 int len_replaced = strlen(replaced);
403 int len_to_replace = strlen(toReplace);
404 insert_len = len_replaced - len_to_replace;
405 grow(this->length() + insert_len);
406 // save remainder and create gap
407 memmove(this->chars + pos + len_replaced,
408 this->chars + pos + len_to_replace,
409 old_len - pos - len_to_replace + 1);
410 // move new string into gap
411 memmove(this->chars + pos, replaced, len_replaced);
412 result = true;
413 len += insert_len;
414 }
415 }
416 return result;
417 }
418
420 virtual bool replaceAll(const char* toReplace, const char* replaced) {
421 if (indexOf(toReplace) == -1) {
422 return false;
423 }
424 while (replace(toReplace, replaced));
425 return true;
426 }
427
429 virtual void remove(const char* toRemove) {
430 if (!isConst() && chars != nullptr) {
431 int removeLen = strlen(toRemove);
432 int pos = indexOf(toRemove);
433 if (pos >= 0) {
434 memmove((void*)(chars + pos), (void*)(chars + pos + removeLen),
435 len - (pos + removeLen) + 1);
436 len -= removeLen;
437 }
438 }
439 }
440
442 virtual void removeAll(const char* toRemove) {
443 if (!isConst() && chars != nullptr) {
444 int removeLen = strlen(toRemove);
445 while (true) {
446 int pos = indexOf(toRemove);
447 if (pos == -1) {
448 break;
449 }
450 memmove((void*)(chars + pos), (void*)(chars + pos + removeLen),
451 len - (pos + removeLen) + 1);
452 len -= removeLen;
453 }
454 }
455 }
456
458 virtual void setLength(int len, bool addZero = true) {
459 if (!isConst() && addZero) {
460 this->savedChar = chars[len];
461 this->savedLen = len;
462 this->len = len;
463 chars[len] = 0;
464 }
465 }
466
468 virtual void setLengthUndo() {
469 if (savedLen >= 0) {
470 chars[len] = savedChar;
471 this->len = savedLen;
472 savedLen = -1;
473 }
474 }
475
477 virtual void substring(StrView& from, int start, int end) {
478 if (end > start) {
479 int len = end - start;
480 grow(len);
481 if (this->chars != nullptr) {
482 len = len < this->maxlen ? len : this->maxlen;
483 strncpy(this->chars, from.chars + start, len);
484 this->len = len;
485 this->chars[len] = 0;
486 }
487 }
488 }
489
491 virtual void substring(const char* from, int start, int end) {
492 if (end > start) {
493 int len = end - start;
494 grow(len);
495 if (this->chars != nullptr) {
496 strncpy(this->chars, from + start, len);
497 this->chars[len] = 0;
498 this->len = len;
499 }
500 }
501 }
502
504 virtual void trim() {
505 if (chars == nullptr) return;
506 rtrim();
507 ltrim();
508 }
509
511 virtual int count(char c, int startPos) {
512 for (int j = startPos; j < len; j++) {
513 if (chars[j] != c) {
514 return j;
515 }
516 }
517 return 0;
518 }
519
521 virtual void ltrim() {
522 if (chars == nullptr) return;
523 int n = count(' ', 0);
524 if (n > 0) *this << n;
525 }
526
528 virtual void rtrim() {
529 if (chars == nullptr) return;
530 if (!isConst()) {
531 while (isspace(chars[len])) {
532 len--;
533 chars[len] = 0;
534 }
535 }
536 }
537
539 virtual void clear() {
540 if (chars != nullptr && !isConst()) {
541 chars[0] = 0;
542 }
543 len = 0;
544 }
545
547 virtual bool isOnHeap() { return false; }
548
550 virtual bool isConst() { return is_const; }
551
553 virtual void insert(int pos, const char* str) {
554 if (!isConst()) {
555 int insert_len = strlen(str);
556 grow(this->length() + insert_len);
557 int move_len = this->len - pos + 1;
558 memmove(chars + pos + insert_len, chars + pos, move_len);
559 strncpy(chars + pos, str, insert_len);
560 }
561 }
562
564 virtual bool equalsIgnoreCase(const char* alt) const {
565 if ((size_t)len != strlen(alt)) {
566 return false;
567 }
568 for (int j = 0; j < len; j++) {
569 if (tolower(chars[j]) != tolower(alt[j])) return false;
570 }
571 return true;
572 }
573
575 int toInt() {
576 int result = 0;
577 if (!isEmpty()) {
578 result = atoi(chars);
579 }
580 return result;
581 }
582
584 long toLong() {
585 long result = 0;
586 if (!isEmpty()) {
587 result = atol(chars);
588 }
589 return result;
590 }
591
593 double toDouble() {
594 double result = 0;
595 char* eptr;
596 if (!isEmpty()) {
597 result = strtod(chars, &eptr);
598 }
599 return result;
600 }
601
603 float toFloat() {
604 float result = 0;
605 char* eptr;
606 if (!isEmpty()) {
607#ifdef USE_STRTOD
608 result = strtof(chars, &eptr);
609#else
610 result = strtod(chars, &eptr);
611#endif
612 }
613 return result;
614 }
615
617 void toLowerCase() {
618 if (chars != nullptr) {
619 for (int j = 0; j < len; j++) {
620 chars[j] = tolower(chars[j]);
621 }
622 }
623 }
624
626 void toUpperCase() {
627 if (chars != nullptr) {
628 for (int j = 0; j < len; j++) {
629 chars[j] = toupper(chars[j]);
630 }
631 }
632 }
633
635 static const char* toBinary(void const* const ptr, size_t const size) {
636 static char result[160];
637 unsigned char* b = (unsigned char*)ptr;
638 unsigned char byte;
639 int i, j, idx = 0;
640
641 for (i = size - 1; i >= 0; i--) {
642 for (j = 7; j >= 0; j--) {
643 byte = (b[i] >> j) & 1;
644 result[idx++] = byte ? '1' : '0';
645 }
646 }
647 result[idx] = 0;
648 return result;
649 }
650
651 bool containsNumber() {
652 for (int j = 0; j < len; j++) {
653 if (isdigit(chars[j])) {
654 return true;
655 }
656 }
657 return false;
658 }
659
661 bool isInteger() {
662 bool result = containsNumber();
663 int minus_count = 0;
664 for (int j = 0; j < len; j++) {
665 char c = chars[j];
666 if (!isdigit(c)) {
667 switch (c) {
668 case '-':
669 minus_count++;
670 if (minus_count > 1) {
671 result = false;
672 }
673 break;
674 default:
675 result = false;
676 break;
677 }
678 }
679 }
680 return result;
681 }
682
685 int result = 0;
686 int pos = indexOf(".");
687 if (pos >= 0) {
688 for (int j = pos + 1; j < len; j++) {
689 if (isdigit(chars[j])) {
690 pos++;
691 } else {
692 break;
693 }
694 }
695 }
696 return result;
697 }
698
699 // Returns true if the string is a number
700 bool isNumber() {
701 bool result = containsNumber();
702 int dot_count = 0;
703 int minus_count = 0;
704 for (int j = 0; j < len; j++) {
705 char c = chars[j];
706 if (!isdigit(c)) {
707 switch (c) {
708 case '-':
709 minus_count++;
710 if (minus_count > 1) {
711 result = false;
712 }
713 break;
714 case '.':
715 dot_count++;
716 if (dot_count > 1) {
717 result = false;
718 }
719 break;
720 default:
721 result = false;
722 break;
723 }
724 }
725 }
726 return result;
727 }
728
729
730 protected:
731 char* chars = nullptr;
732 bool is_const = false;
733 int len = 0;
734 int maxlen = 0;
735 int savedLen = -1;
736 char savedChar;
737
739 virtual bool grow(int newMaxLen) { return false; }
740
741 static char* itoa(int n, char s[]) {
742 int i, sign;
743 if ((sign = n) < 0) /* record sign */
744 n = -n; /* make n positive */
745 i = 0;
746 do { /* generate digits in reverse order */
747 s[i++] = n % 10 + '0'; /* get next digit */
748 } while ((n /= 10) > 0); /* delete it */
749 if (sign < 0) s[i++] = '-';
750 s[i] = '\0';
751 reverse(s);
752 return s;
753 }
754
755 static void reverse(char s[]) {
756 int i, j;
757 char c;
758
759 for (i = 0, j = strlen(s) - 1; i < j; i++, j--) {
760 c = s[i];
761 s[i] = s[j];
762 s[j] = c;
763 }
764 }
765
766 static char* floatToString(char* outstr, double val, int precision,
767 int widthp) {
768 char temp[16];
769 int i;
770
772 double roundingFactor = 0.5;
773 unsigned long mult = 1;
774 for (i = 0; i < precision; i++) {
775 roundingFactor /= 10.0;
776 mult *= 10;
777 }
778
779 temp[0] = '\0';
780 outstr[0] = '\0';
781
782 if (val < 0.0) {
783 strcpy(outstr, "-\0");
784 val = -val;
785 }
786
787 val += roundingFactor;
788
789 strcat(outstr, itoa(int(val), temp)); // prints the int part
790 if (precision > 0) {
791 strcat(outstr, ".\0");
792 unsigned long frac;
793 unsigned long mult = 1;
794 int padding = precision - 1;
795 while (precision--) mult *= 10;
796
797 if (val >= 0)
798 frac = (val - int(val)) * mult;
799 else
800 frac = (int(val) - val) * mult;
801 unsigned long frac1 = frac;
802
803 while (frac1 /= 10) padding--;
804
805 while (padding--) strcat(outstr, "0\0");
806
807 strcat(outstr, itoa(frac, temp));
808 }
809
811 if ((widthp != 0) && ((size_t)widthp >= strlen(outstr))) {
812 int J = 0;
813 J = widthp - strlen(outstr);
814
815 for (i = 0; i < J; i++) {
816 temp[i] = ' ';
817 }
818
819 temp[i++] = '\0';
820 strcat(temp, outstr);
821 strcpy(outstr, temp);
822 }
823
824 return outstr;
825 }
826
827 static int strncmp_i(const char* s1, const char* s2, int n) {
828 if (n == 0) return (0);
829 do {
830 if (tolower(*s1) != tolower(*s2++))
831 return (*(unsigned char*)s1 - *(unsigned char*)--s2);
832 if (*s1++ == 0) break;
833 } while (--n != 0);
834 return (0);
835 }
836};
837
838} // namespace audio_tools
A simple wrapper to provide string functions on existing allocated char*. If the underlying char* is ...
Definition StrView.h:28
static char * floatToString(char *outstr, double val, int precision, int widthp)
Definition StrView.h:766
virtual void operator=(char *str)
we can assign a char*
Definition StrView.h:322
StrView(const char *chars)
Creates a Str for string constant.
Definition StrView.h:33
virtual bool equals(const char *str)
checks if the string equals indicated parameter string
Definition StrView.h:165
virtual bool grow(int newMaxLen)
only supported in subclasses
Definition StrView.h:739
virtual void operator=(char c)
we can assign a char
Definition StrView.h:325
virtual void operator+=(const char *str)
adds a substring at the end of the string
Definition StrView.h:346
virtual bool endsWith(const char *str)
checks if the string ends with the indicated substring
Definition StrView.h:178
virtual bool equalsIgnoreCase(const char *alt) const
Compares the string ignoring the case.
Definition StrView.h:564
virtual void substring(const char *from, int start, int end)
copies a substring into the current string
Definition StrView.h:491
virtual bool operator!=(const StrView &alt) const
checks if the indicated string is different from the current string
Definition StrView.h:369
bool isInteger()
Returns true if the string is an integer.
Definition StrView.h:661
virtual int length()
Definition StrView.h:383
virtual void operator=(double val)
we can assign a double
Definition StrView.h:328
virtual void set(char chars[], int maxlen, int len=0, bool isConst=false)
assigns a memory buffer
Definition StrView.h:114
virtual int maxLength()
provides the maximum length of the string
Definition StrView.h:389
virtual bool isOnHeap()
checks if the string is on the heap
Definition StrView.h:547
virtual bool startsWith(const char *str)
checks if the string starts with the indicated substring
Definition StrView.h:171
virtual bool operator==(const char *alt) const
checks if the indicated string is equal to the current string
Definition StrView.h:364
virtual void operator+=(double value)
adds a double at the end of the string
Definition StrView.h:352
virtual bool isEmpty()
checks if the string is empty
Definition StrView.h:386
virtual void add(const char c)
adds a character
Definition StrView.h:156
virtual int nIndexOf(const char c, int n)
searches for the nth occurence of the indicated character
Definition StrView.h:270
virtual void operator+=(int value)
adds a int at the end of the string
Definition StrView.h:349
double toDouble()
Converts the string to a double.
Definition StrView.h:593
virtual bool operator==(const StrView &alt) const
checks if the indicated string is equal to the current string
Definition StrView.h:358
virtual bool contains(const char *str)
checks if the string contains a substring
Definition StrView.h:280
virtual int lastIndexOf(const char *cont)
provides the position of the last occurrence of the indicated substring
Definition StrView.h:297
virtual void rtrim()
remove trailing spaces
Definition StrView.h:528
virtual bool replaceAll(const char *toReplace, const char *replaced)
Replaces all instances of toReplace with replaced.
Definition StrView.h:420
virtual void add(const char *append)
adds a string
Definition StrView.h:144
virtual int count(char c, int startPos)
count number of indicated characters as position
Definition StrView.h:511
int numberOfDecimals()
Determines the number of decimals in the number string.
Definition StrView.h:684
virtual void setLength(int len, bool addZero=true)
limits the length of the string (by adding a delimiting 0)
Definition StrView.h:458
virtual void trim()
remove leading and traling spaces
Definition StrView.h:504
virtual void operator=(int value)
we can assign an int
Definition StrView.h:331
virtual void set(const char *alt)
assigs a value
Definition StrView.h:47
virtual void operator+=(const char value)
adds a character
Definition StrView.h:355
virtual void operator=(const char *str)
we can assign a const char*
Definition StrView.h:319
virtual bool replace(const char *toReplace, const char *replaced)
Replaces the first instance of toReplace with replaced.
Definition StrView.h:392
StrView(char chars[], int maxlen, int len=0)
Creates a Str with the indicated buffer.
Definition StrView.h:44
virtual void clear()
clears the string by setting the terminating 0 at the beginning
Definition StrView.h:539
long toLong()
Converts the string to an long.
Definition StrView.h:584
virtual void ltrim()
remove leading spaces
Definition StrView.h:521
virtual bool matches(const char *pattern)
Definition StrView.h:193
virtual int nIndexOf(const char *cont, int n)
searches for the nth occurence of the indicated character
Definition StrView.h:309
virtual void substring(StrView &from, int start, int end)
copies a substring into the current string
Definition StrView.h:477
virtual const char * c_str()
provides the string value as const char*
Definition StrView.h:379
float toFloat()
Converts the string to a float.
Definition StrView.h:603
virtual void removeAll(const char *toRemove)
removes the indicated substring from the string
Definition StrView.h:442
virtual void operator<<(int n)
shift characters to the right -> we just move the pointer
Definition StrView.h:334
virtual bool endsWithIgnoreCase(const char *str)
checks if the string ends with the indicated substring
Definition StrView.h:185
virtual void set(const StrView &alt)
assigs from another Str value
Definition StrView.h:66
int toInt()
Converts the string to an int.
Definition StrView.h:575
virtual void add(double value, int precision=2, int withd=0)
adds a double value
Definition StrView.h:135
virtual int indexOf(const char *cont, int start=0)
Definition StrView.h:284
virtual void remove(const char *toRemove)
removes the indicated substring from the string
Definition StrView.h:429
virtual bool isConst()
checks if the string is a constant that must not be changed
Definition StrView.h:550
virtual void insert(int pos, const char *str)
inserts a substring into the string
Definition StrView.h:553
virtual int indexOf(const char c, int start=0)
Definition StrView.h:260
virtual void add(int value)
adds a int value
Definition StrView.h:126
static const char * toBinary(void const *const ptr, size_t const size)
provides a binary string represntation
Definition StrView.h:635
void toLowerCase()
Converts the string to lowercase letters.
Definition StrView.h:617
virtual void setLengthUndo()
undo the last setLength call
Definition StrView.h:468
void toUpperCase()
Converts the string to uppercase letters.
Definition StrView.h:626
virtual bool operator!=(const char *alt) const
checks if the indicated string is different from the current string
Definition StrView.h:374
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition AudioCodecsBase.h:10