10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbeb7c4 commit 9fe34f6Copy full SHA for 9fe34f6
cores/esp32/WString.cpp
@@ -24,6 +24,7 @@
24
#include <Arduino.h>
25
#include "WString.h"
26
#include "stdlib_noniso.h"
27
+#include "esp32-hal-log.h"
28
29
/*********************************************/
30
/* Constructors */
@@ -774,7 +775,8 @@ void String::replace(const String& find, const String& replace) {
774
775
if(size == len())
776
return;
777
if(size > capacity() && !changeBuffer(size))
- return; // XXX: tell user!
778
+ log_w("String.Replace() Insufficient space to replace string");
779
+ return;
780
int index = len() - 1;
781
while(index >= 0 && (index = lastIndexOf(find, index)) >= 0) {
782
readFrom = wbuffer() + index + find.len();
0 commit comments