arduino-audio-tools
StrView.h
1 #pragma once
2 
3 #include <stdio.h>
4 #include <string.h>
5 
6 #include "AudioTools/CoreAudio/AudioLogger.h"
7 
16 namespace audio_tools {
17 
28 class 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  void toLowerCase() {
604  if (chars != nullptr) {
605  for (int j = 0; j < len; j++) {
606  chars[j] = tolower(chars[j]);
607  }
608  }
609  }
610 
612  void toUpperCase() {
613  if (chars != nullptr) {
614  for (int j = 0; j < len; j++) {
615  chars[j] = toupper(chars[j]);
616  }
617  }
618  }
619 
621  static const char* toBinary(void const* const ptr, size_t const size) {
622  static char result[160];
623  unsigned char* b = (unsigned char*)ptr;
624  unsigned char byte;
625  int i, j, idx = 0;
626 
627  for (i = size - 1; i >= 0; i--) {
628  for (j = 7; j >= 0; j--) {
629  byte = (b[i] >> j) & 1;
630  result[idx++] = byte ? '1' : '0';
631  }
632  }
633  result[idx] = 0;
634  return result;
635  }
636 
637  bool containsNumber() {
638  for (int j = 0; j < len; j++) {
639  if (isdigit(chars[j])) {
640  return true;
641  }
642  }
643  return false;
644  }
645 
647  bool isInteger() {
648  bool result = containsNumber();
649  int minus_count = 0;
650  for (int j = 0; j < len; j++) {
651  char c = chars[j];
652  if (!isdigit(c)) {
653  switch (c) {
654  case '-':
655  minus_count++;
656  if (minus_count > 1) {
657  result = false;
658  }
659  break;
660  default:
661  result = false;
662  break;
663  }
664  }
665  }
666  return result;
667  }
668 
671  int result = 0;
672  int pos = indexOf(".");
673  if (pos >= 0) {
674  for (int j = pos + 1; j < len; j++) {
675  if (isdigit(chars[j])) {
676  pos++;
677  } else {
678  break;
679  }
680  }
681  }
682  return result;
683  }
684 
685  // Returns true if the string is a number
686  bool isNumber() {
687  bool result = containsNumber();
688  int dot_count = 0;
689  int minus_count = 0;
690  for (int j = 0; j < len; j++) {
691  char c = chars[j];
692  if (!isdigit(c)) {
693  switch (c) {
694  case '-':
695  minus_count++;
696  if (minus_count > 1) {
697  result = false;
698  }
699  break;
700  case '.':
701  dot_count++;
702  if (dot_count > 1) {
703  result = false;
704  }
705  break;
706  default:
707  result = false;
708  break;
709  }
710  }
711  }
712  return result;
713  }
714 
715  protected:
716  char* chars = nullptr;
717  bool is_const = false;
718  int len = 0;
719  int maxlen = 0;
720  int savedLen = -1;
721  char savedChar;
722 
724  virtual bool grow(int newMaxLen) { return false; }
725 
726  static char* itoa(int n, char s[]) {
727  int i, sign;
728  if ((sign = n) < 0) /* record sign */
729  n = -n; /* make n positive */
730  i = 0;
731  do { /* generate digits in reverse order */
732  s[i++] = n % 10 + '0'; /* get next digit */
733  } while ((n /= 10) > 0); /* delete it */
734  if (sign < 0) s[i++] = '-';
735  s[i] = '\0';
736  reverse(s);
737  return s;
738  }
739 
740  static void reverse(char s[]) {
741  int i, j;
742  char c;
743 
744  for (i = 0, j = strlen(s) - 1; i < j; i++, j--) {
745  c = s[i];
746  s[i] = s[j];
747  s[j] = c;
748  }
749  }
750 
751  static char* floatToString(char* outstr, double val, int precision,
752  int widthp) {
753  char temp[16];
754  int i;
755 
757  double roundingFactor = 0.5;
758  unsigned long mult = 1;
759  for (i = 0; i < precision; i++) {
760  roundingFactor /= 10.0;
761  mult *= 10;
762  }
763 
764  temp[0] = '\0';
765  outstr[0] = '\0';
766 
767  if (val < 0.0) {
768  strcpy(outstr, "-\0");
769  val = -val;
770  }
771 
772  val += roundingFactor;
773 
774  strcat(outstr, itoa(int(val), temp)); // prints the int part
775  if (precision > 0) {
776  strcat(outstr, ".\0");
777  unsigned long frac;
778  unsigned long mult = 1;
779  int padding = precision - 1;
780  while (precision--) mult *= 10;
781 
782  if (val >= 0)
783  frac = (val - int(val)) * mult;
784  else
785  frac = (int(val) - val) * mult;
786  unsigned long frac1 = frac;
787 
788  while (frac1 /= 10) padding--;
789 
790  while (padding--) strcat(outstr, "0\0");
791 
792  strcat(outstr, itoa(frac, temp));
793  }
794 
796  if ((widthp != 0) && ((size_t)widthp >= strlen(outstr))) {
797  int J = 0;
798  J = widthp - strlen(outstr);
799 
800  for (i = 0; i < J; i++) {
801  temp[i] = ' ';
802  }
803 
804  temp[i++] = '\0';
805  strcat(temp, outstr);
806  strcpy(outstr, temp);
807  }
808 
809  return outstr;
810  }
811 
812  static int strncmp_i(const char* s1, const char* s2, int n) {
813  if (n == 0) return (0);
814  do {
815  if (tolower(*s1) != tolower(*s2++))
816  return (*(unsigned char*)s1 - *(unsigned char*)--s2);
817  if (*s1++ == 0) break;
818  } while (--n != 0);
819  return (0);
820  }
821 };
822 
823 } // namespace audio_tools
A simple wrapper to provide string functions on existing allocated char*. If the underlying char* is ...
Definition: StrView.h:28
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:724
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:647
virtual int length()
Definition: StrView.h:383
static const char * toBinary(void const *const ptr, size_t const size)
provides a binary string represntation
Definition: StrView.h:621
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
static char * floatToString(char *outstr, double val, int precision, int widthp)
Definition: StrView.h:751
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:670
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 const char * c_str()
provides the string value as const char*
Definition: StrView.h:379
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 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
void toLowerCase()
Converts the string to lowercase letters.
Definition: StrView.h:603
virtual void setLengthUndo()
undo the last setLength call
Definition: StrView.h:468
void toUpperCase()
Converts the string to uppercase letters.
Definition: StrView.h:612
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: AudioConfig.h:821