diff --git a/_container_a_v_i_8h_source.html b/_container_a_v_i_8h_source.html
index a7212834b2..bef22b9001 100644
--- a/_container_a_v_i_8h_source.html
+++ b/_container_a_v_i_8h_source.html
@@ -774,8 +774,8 @@
-
-
+
+
diff --git a/_str_ext_8h_source.html b/_str_ext_8h_source.html
index 6b6c2aa311..5ead19f820 100644
--- a/_str_ext_8h_source.html
+++ b/_str_ext_8h_source.html
@@ -77,148 +77,201 @@
-
-
+
+
- 28 StrExt(
int initialAllocatedLength) :
Str() {
- 29 maxlen = initialAllocatedLength;
-
-
+ 28 StrExt(
int initialAllocatedLength) :
Str() {
+ 29 maxlen = initialAllocatedLength;
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 42 if (chars !=
nullptr) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+ 77 size_t capacity() {
return maxlen; }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 99 void setCapacity(
size_t newLen){
-
-
-
-
- 104 void allocate(
int len=-1) {
- 105 int new_size = len<0?maxlen:len;
-
- 107 this->len = new_size;
-
-
- 111 void copyFrom(
const char *source,
int len,
int maxlen=0){
- 112 this->maxlen = maxlen==0? len : maxlen;
-
- 114 if (this->chars!=
nullptr){
-
- 116 this->is_const =
false;
- 117 memmove(this->chars, source, len);
- 118 this->chars[len] = 0;
-
-
-
-
-
- 125 if (this->chars!=
nullptr){
- 126 for (
int j=0;j<len;j++){
-
-
-
- 130 this->is_const =
false;
-
-
-
-
-
-
-
-
-
- 140 assert(newMaxLen<1024*10);
-
- 142 if (chars==
nullptr || newMaxLen > maxlen ){
- 143 LOGD(
"grow(%d)",newMaxLen);
-
-
-
- 147 int newSize = newMaxLen > maxlen ? newMaxLen : maxlen;
- 148 vector.resize(newSize+1);
-
-
-
-
-
-
-
-
-
-
+ 79 void setCapacity(
size_t newLen) {
grow(newLen); }
+
+
+ 82 void allocate(
int len = -1) {
+ 83 int new_size = len < 0 ? maxlen : len;
+
+
+
+
+ 89 void copyFrom(
const char *source,
int len,
int maxlen = 0) {
+ 90 this->maxlen = maxlen == 0 ? len : maxlen;
+
+ 92 if (this->chars !=
nullptr) {
+
+ 94 this->is_const =
false;
+ 95 memmove(this->chars, source, len);
+
+
+
+
+
+
+ 103 if (this->chars !=
nullptr) {
+ 104 for (
int j = 0; j < len; j++) {
+
+
+
+ 108 this->is_const =
false;
+ 109 this->chars[len] = 0;
+
+
+
+
+
+
+
+ 118 for (
size_t i = 0; i < len; i++) {
+ 119 urlEncodeChar(chars[i], temp, 4);
+ 120 new_size += strlen(temp);
+
+
+ 123 char result[new_size + 1] = {0};
+ 124 for (
size_t i = 0; i < len; i++) {
+ 125 urlEncodeChar(chars[i], temp, 4);
+ 126 strcat(result, temp);
+
+
+
+ 130 strcpy(chars, result);
+ 131 this->len = strlen(temp);
+
+
+
+
+
+ 138 size_t result_idx = 0;
+
+ 140 if (chars[i] ==
'%') {
+ 141 szTemp[0] = chars[i + 1];
+ 142 szTemp[1] = chars[i + 2];
+ 143 chars[result_idx] = strToBin(szTemp);
+
+ 145 }
else if (chars[i] ==
'+') {
+ 146 chars[result_idx] =
' ';
+
+
+ 149 chars[result_idx] += chars[i];
+
+
+
+
+ 154 chars[result_idx] = 0;
+ 155 this->len = result_idx;
+
+
+
+
+
+
+
+ 163 assert(newMaxLen < 1024 * 10);
+
+ 165 if (chars ==
nullptr || newMaxLen > maxlen) {
+ 166 LOGD(
"grow(%d)", newMaxLen);
+
+
+
+ 170 int newSize = newMaxLen > maxlen ? newMaxLen : maxlen;
+ 171 vector.resize(newSize + 1);
+
+
+
+
+
+
+ 178 void urlEncodeChar(
char c,
char *result,
int maxLen) {
+
+ 180 snprintf(result, maxLen,
"%c", c);
+ 181 }
else if (isspace(c)) {
+ 182 snprintf(result, maxLen,
"%s",
"+");
+
+ 184 snprintf(result, maxLen,
"%%%X%X", c >> 4, c % 16);
+
+
+
+ 188 char charToInt(
char ch) {
+ 189 if (ch >=
'0' && ch <=
'9') {
+ 190 return (
char)(ch -
'0');
+
+ 192 if (ch >=
'a' && ch <=
'f') {
+ 193 return (
char)(ch -
'a' + 10);
+
+ 195 if (ch >=
'A' && ch <=
'F') {
+ 196 return (
char)(ch -
'A' + 10);
+
+
+
+
+ 201 char strToBin(
char *pString) {
+
+
+ 204 szBuffer[0] = charToInt(pString[0]);
+ 205 szBuffer[1] = charToInt(pString[1]);
+ 206 ch = (szBuffer[0] << 4) | szBuffer[1];
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/classaudio__tools_1_1_str_ext-members.html b/classaudio__tools_1_1_str_ext-members.html
index 62fc831d2a..db95e81b3e 100644
--- a/classaudio__tools_1_1_str_ext-members.html
+++ b/classaudio__tools_1_1_str_ext-members.html
@@ -80,85 +80,87 @@
c_str() | Str | inlinevirtual |
capacity() (defined in StrExt) | StrExt | inline |
chars (defined in Str) | Str | protected |
- clear() | Str | inlinevirtual |
- contains(const char *str) | Str | inlinevirtual |
- containsNumber() (defined in Str) | Str | inline |
- copyFrom(const char *source, int len, int maxlen=0) | StrExt | inline |
- count(char c, int startPos) | Str | inlinevirtual |
- endsWith(const char *str) | Str | inlinevirtual |
- endsWithIgnoreCase(const char *str) | Str | inlinevirtual |
- equals(const char *str) | Str | inlinevirtual |
- equalsIgnoreCase(const char *alt) | Str | inlinevirtual |
- floatToString(char *outstr, double val, int precision, int widthp) | Str | inlineprotectedstatic |
- grow(int newMaxLen) | StrExt | inlineprotectedvirtual |
- indexOf(const char c, int start=0) | Str | inlinevirtual |
- indexOf(const char *cont, int start=0) | Str | inlinevirtual |
- insert(int pos, const char *str) | Str | inlinevirtual |
- is_const (defined in Str) | Str | protected |
- isConst() override | StrExt | inlinevirtual |
- isEmpty() | Str | inlinevirtual |
- isInteger() | Str | inline |
- isNumber() (defined in Str) | Str | inline |
- isOnHeap() override | StrExt | inlinevirtual |
- itoa(int n, char s[]) (defined in Str) | Str | inlineprotectedstatic |
- lastIndexOf(const char *cont) | Str | inlinevirtual |
- len (defined in Str) | Str | protected |
- length() | Str | inlinevirtual |
- ltrim() | Str | inlinevirtual |
- matches(const char *pattern) | Str | inlinevirtual |
- maxlen (defined in Str) | Str | protected |
- maxLength() | Str | inlinevirtual |
- numberOfDecimals() | Str | inline |
- operator!=(const Str &alt) const | Str | inlinevirtual |
- operator!=(const char *alt) const | Str | inlinevirtual |
- operator+=(const char *str) | Str | inlinevirtual |
- operator+=(int value) | Str | inlinevirtual |
- operator+=(double value) | Str | inlinevirtual |
- operator+=(const char value) | Str | inlinevirtual |
- operator<<(int n) | Str | inlinevirtual |
- operator=(StrExt &&obj) (defined in StrExt) | StrExt | inline |
- operator=(StrExt &obj) (defined in StrExt) | StrExt | inline |
- operator=(const char *str) | StrExt | inlinevirtual |
- operator=(char *str) | StrExt | inlinevirtual |
- operator=(int v) | StrExt | inlinevirtual |
- operator=(double v) | StrExt | inlinevirtual |
- operator=(const Str &)=default (defined in Str) | Str | |
- operator=(Str &&)=default (defined in Str) | Str | |
- audio_tools::Str::operator=(char c) | Str | inlinevirtual |
- operator==(const Str &alt) const | Str | inlinevirtual |
- operator==(const char *alt) const | Str | inlinevirtual |
- operator[](int index) (defined in Str) | Str | inlinevirtual |
- remove(const char *toRemove) | Str | inlinevirtual |
- removeAll(const char *toRemove) | Str | inlinevirtual |
- replace(const char *toReplace, const char *replaced) | Str | inlinevirtual |
- replaceAll(const char *toReplace, const char *replaced) | Str | inlinevirtual |
- reverse(char s[]) (defined in Str) | Str | inlineprotectedstatic |
- rtrim() | Str | inlinevirtual |
- savedChar (defined in Str) | Str | protected |
- savedLen (defined in Str) | Str | protected |
- set(const char *alt) | Str | inlinevirtual |
- set(const Str &alt) | Str | inlinevirtual |
- set(const char c) (defined in Str) | Str | inlinevirtual |
- set(int value) (defined in Str) | Str | inlinevirtual |
- set(double value, int precision=2, int withd=0) (defined in Str) | Str | inlinevirtual |
- set(char chars[], int maxlen, int len=0, bool isConst=false) | Str | inlinevirtual |
- setCapacity(size_t newLen) (defined in StrExt) | StrExt | inline |
- setChars(char c, int len) | StrExt | inline |
- setLength(int len, bool addZero=true) | Str | inlinevirtual |
- setLengthUndo() | Str | inlinevirtual |
- startsWith(const char *str) | Str | inlinevirtual |
- Str()=default (defined in Str) | Str | |
- Str(const char *chars) | Str | inline |
- Str(char chars[], int maxlen, int len=0) | Str | inline |
- Str(const Str &)=default (defined in Str) | Str | |
- Str(Str &&)=default (defined in Str) | Str | |
- StrExt()=default (defined in StrExt) | StrExt | |
- StrExt(int initialAllocatedLength) (defined in StrExt) | StrExt | inline |
- StrExt(Str &source) (defined in StrExt) | StrExt | inline |
- StrExt(StrExt &source) (defined in StrExt) | StrExt | inline |
- StrExt(const char *str) (defined in StrExt) | StrExt | inline |
- StrExt(StrExt &&obj)=default (defined in StrExt) | StrExt | |
- strncmp_i(const char *s1, const char *s2, int n) (defined in Str) | Str | inlineprotectedstatic |
+ charToInt(char ch) (defined in StrExt) | StrExt | inlineprotected |
+ clear() | Str | inlinevirtual |
+ contains(const char *str) | Str | inlinevirtual |
+ containsNumber() (defined in Str) | Str | inline |
+ copyFrom(const char *source, int len, int maxlen=0) | StrExt | inline |
+ count(char c, int startPos) | Str | inlinevirtual |
+ endsWith(const char *str) | Str | inlinevirtual |
+ endsWithIgnoreCase(const char *str) | Str | inlinevirtual |
+ equals(const char *str) | Str | inlinevirtual |
+ equalsIgnoreCase(const char *alt) | Str | inlinevirtual |
+ floatToString(char *outstr, double val, int precision, int widthp) | Str | inlineprotectedstatic |
+ grow(int newMaxLen) | StrExt | inlineprotectedvirtual |
+ indexOf(const char c, int start=0) | Str | inlinevirtual |
+ indexOf(const char *cont, int start=0) | Str | inlinevirtual |
+ insert(int pos, const char *str) | Str | inlinevirtual |
+ is_const (defined in Str) | Str | protected |
+ isConst() override | StrExt | inlinevirtual |
+ isEmpty() | Str | inlinevirtual |
+ isInteger() | Str | inline |
+ isNumber() (defined in Str) | Str | inline |
+ isOnHeap() override | StrExt | inlinevirtual |
+ itoa(int n, char s[]) (defined in Str) | Str | inlineprotectedstatic |
+ lastIndexOf(const char *cont) | Str | inlinevirtual |
+ len (defined in Str) | Str | protected |
+ length() | Str | inlinevirtual |
+ ltrim() | Str | inlinevirtual |
+ matches(const char *pattern) | Str | inlinevirtual |
+ maxlen (defined in Str) | Str | protected |
+ maxLength() | Str | inlinevirtual |
+ numberOfDecimals() | Str | inline |
+ operator!=(const Str &alt) const | Str | inlinevirtual |
+ operator!=(const char *alt) const | Str | inlinevirtual |
+ operator+=(const char *str) | Str | inlinevirtual |
+ operator+=(int value) | Str | inlinevirtual |
+ operator+=(double value) | Str | inlinevirtual |
+ operator+=(const char value) | Str | inlinevirtual |
+ operator<<(int n) | Str | inlinevirtual |
+ operator=(StrExt &&obj) (defined in StrExt) | StrExt | inline |
+ operator=(StrExt &obj) (defined in StrExt) | StrExt | inline |
+ operator=(const char *str) | StrExt | inlinevirtual |
+ operator=(char *str) | StrExt | inlinevirtual |
+ operator=(int v) | StrExt | inlinevirtual |
+ operator=(double v) | StrExt | inlinevirtual |
+ operator=(const Str &)=default (defined in Str) | Str | |
+ operator=(Str &&)=default (defined in Str) | Str | |
+ audio_tools::Str::operator=(char c) | Str | inlinevirtual |
+ operator==(const Str &alt) const | Str | inlinevirtual |
+ operator==(const char *alt) const | Str | inlinevirtual |
+ operator[](int index) (defined in Str) | Str | inlinevirtual |
+ remove(const char *toRemove) | Str | inlinevirtual |
+ removeAll(const char *toRemove) | Str | inlinevirtual |
+ replace(const char *toReplace, const char *replaced) | Str | inlinevirtual |
+ replaceAll(const char *toReplace, const char *replaced) | Str | inlinevirtual |
+ reverse(char s[]) (defined in Str) | Str | inlineprotectedstatic |
+ rtrim() | Str | inlinevirtual |
+ savedChar (defined in Str) | Str | protected |
+ savedLen (defined in Str) | Str | protected |
+ set(const char *alt) | Str | inlinevirtual |
+ set(const Str &alt) | Str | inlinevirtual |
+ set(const char c) (defined in Str) | Str | inlinevirtual |
+ set(int value) (defined in Str) | Str | inlinevirtual |
+ set(double value, int precision=2, int withd=0) (defined in Str) | Str | inlinevirtual |
+ set(char chars[], int maxlen, int len=0, bool isConst=false) | Str | inlinevirtual |
+ setCapacity(size_t newLen) (defined in StrExt) | StrExt | inline |
+ setChars(char c, int len) | StrExt | inline |
+ setLength(int len, bool addZero=true) | Str | inlinevirtual |
+ setLengthUndo() | Str | inlinevirtual |
+ startsWith(const char *str) | Str | inlinevirtual |
+ Str()=default (defined in Str) | Str | |
+ Str(const char *chars) | Str | inline |
+ Str(char chars[], int maxlen, int len=0) | Str | inline |
+ Str(const Str &)=default (defined in Str) | Str | |
+ Str(Str &&)=default (defined in Str) | Str | |
+ StrExt()=default (defined in StrExt) | StrExt | |
+ StrExt(int initialAllocatedLength) (defined in StrExt) | StrExt | inline |
+ StrExt(Str &source) (defined in StrExt) | StrExt | inline |
+ StrExt(StrExt &source) (defined in StrExt) | StrExt | inline |
+ StrExt(const char *str) (defined in StrExt) | StrExt | inline |
+ StrExt(StrExt &&obj)=default (defined in StrExt) | StrExt | |
+ strncmp_i(const char *s1, const char *s2, int n) (defined in Str) | Str | inlineprotectedstatic |
+ strToBin(char *pString) (defined in StrExt) | StrExt | inlineprotected |
substring(Str &from, int start, int end) | Str | inlinevirtual |
substring(const char *from, int start, int end) | Str | inlinevirtual |
swap(Str &str) (defined in Str) | Str | inlinevirtual |
@@ -169,8 +171,11 @@
toLowerCase() | Str | inline |
toUpperCase() | Str | inline |
trim() | Str | inlinevirtual |
- vector (defined in StrExt) | StrExt | protected |
- ~StrExt() (defined in StrExt) | StrExt | inline |
+ urlDecode() | StrExt | inline |
+ urlEncode() | StrExt | inline |
+ urlEncodeChar(char c, char *result, int maxLen) (defined in StrExt) | StrExt | inlineprotected |
+ vector (defined in StrExt) | StrExt | protected |
+ ~StrExt() (defined in StrExt) | StrExt | inline |