Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*.replace(); does not work on Arduino Uno Wifi Rev. 2 #109

Open
oppaernst opened this issue Sep 11, 2021 · 0 comments
Open

*.replace(); does not work on Arduino Uno Wifi Rev. 2 #109

oppaernst opened this issue Sep 11, 2021 · 0 comments

Comments

@oppaernst
Copy link

oppaernst commented Sep 11, 2021

Hello,

it is not possible for me to get proper results for the following code on all of my Arduino Uno Wifi Rev. 2:

String currentLine = "%2216%22,%20%2217%22";

void setup()
{
  Serial.begin(115200);
  Serial.println(currentLine);
  currentLine.replace("%22","");
  Serial.println(currentLine); 
  currentLine.replace("%20","");
  Serial.println(currentLine);  
  Serial.println("The result should be 16,17 but it is not.");
}

void loop()
{
}

The serial monitor gives me:

%2216%22,%20%2217%22
%2216%22,%20%2217%22
%2216%22,%2217%22

The result (the last Serial.println(currentLine);) should be 16,17 but it is not.

Is there any workaround for this problem?

Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant