inString.replace problem

Hello! I have a little issue dealing with strings. inString has been declared as string and I am using WString.h library..

I should replace all the + with blanks.. now that's what I try:

inString.replace(char * ("+"),char * (" "));

And I get this in return

error: expected primary-expression before 'char'

:-?

Any suggestions?

Try this:

inString.replace("+", " ");

Good Morning!

I've tried that too.. no success

inString.replace("+", " ");

In function 'void loop()':
error: invalid conversion from 'const char*' to 'char

:-/
the weird part is that these are working fine..

String text ="";
..
..
int Start = inString.indexOf("t");
int End = inString.indexOf("H");
text = inString.substring((Start+2), (End-1));

Looking at the error, it expects a const char *. It is c++or like c++.. const is meaning that the value is not changeable.

So try this:

inString.replace(const char * ("+"),const char * (" "));

inString.replace("+", " ");

In function 'void loop()':
error: invalid conversion from 'const char*' to 'char

suggests to me that

inString.replace('+', ' ');

should do the trick.