I have a bit of code:
String urlDecode(String input)
{
input.replace("%20", " ");
input.replace("+", " ");
input.replace("%21", "!");
input.replace("%22", "\"");
input.replace("%23", "#");
input.replace("%24", "$");
input.replace("%25", "%");
input.replace("%26", "&");
input.replace("%27", "\'");
input.replace("%28", "(");
input.replace("%29", ")");
input.replace("%30", "*");
input.replace("%31", "+");
input.replace("%2C", ",");
input.replace("%2E", ".");
input.replace("%2F", "/");
input.replace("%2C", ",");
input.replace("%3A", ":");
input.replace("%3A", ";");
input.replace("%3C", "<");
input.replace("%3D", "=");
input.replace("%3E", ">");
input.replace("%3F", "?");
input.replace("%40", "@");
input.replace("%5B", "[");
input.replace("%5C", "\\");
input.replace("%5D", "]");
input.replace("%5E", "^");
input.replace("%5F", "-");
input.replace("%60", "`");
return input;
}
It causes a compile error:
spark/compile_server/shared/workspace/worker_2/core-firmware/build/lcd.cpp:535: undefined reference to `String::String(String&&)'
collect2: error: ld returned 1 exit status
make: *** [162ed70d8046dc5878194192c1c6e87fbd4fa441f4f0b038ed4a33e8043b.elf] Error 1
I’m not exactly sure why.
Here is the entire file: https://gist.github.com/huslage/9233323
Yes I pasted the entire LiquidCrystal library into the top of the file. I couldn’t get the external files to compile for some reason and this is such a simple piece of firmware I really didn’t care.
The firmware just has a Spark.function() to put text on a screen. There will be a web app that pushes text to the LCD when a button is pressed. This function is meant to remove the URL Encoding from the submitted text.