Hello good day Arduino communiy!
I allways got an error while compiling with the String- .trim() or .replace() function.
I`ve also tried some example code:
String stringOne = "<html><head><body>";
Serial.println(stringOne);
String stringTwo = stringOne.replace("<", "</");
Serial.println(stringTwo);
While compiling the sample source (Arduino v1.0) 8. Strings -> StringReplace:
StringReplace.cpp: In function 'void loop()':
StringReplace:22: error: conversion from 'void' to non-scalar type 'String' requested
StringReplace:28: error: conversion from 'void' to non-scalar type 'String' requested
StringReplace:29: error: no match for 'operator=' in 'leetString = leetString.String::replace('e', '3')'
C:\Users\...\Documents\Arduino\arduino-1.0\hardware\arduino\cores\arduino/WString.h:83: note: candidates are: String& String::operator=(const String&)
C:\Users\...\Documents\Arduino\arduino-1.0\hardware\arduino\cores\arduino/WString.h:84: note: String& String::operator=(const char*)
Thanks in advance
Best regards,
Micha