Hello!
I've just ran in to the following problem:
I have a part of code where I define a string like this:
String freshString(){
String line;
----many thing done here -----
xyz = line,
return line;
Which works well, if I print freshString() to Serial port than I see that it has the value of the line String.
However, later on I have to compare the value of freshString to another "simple" string:
String oldString =("asdf");
if (!(freshString() == oldString){
----do things ----
}
in this case I got the messeage that I want to comapre to different types, which I understand but I don't really know how to get on with this problem.
How canI transform freshString() value to be comparable with "simple" strings? What's the knowhow behind this? I was trying to find info but couldn't succeded.
Please advise!