Whats the best method for stripping the %20 on args when calling a method?

I am sending a message to an LCD using REST and the API. When my messages come in from a forms they have the %20 where there are spaces in text. I am trying to come up with the cleanest way to strip the %20’s out and replace them but didn’t want to overpower the device with a messy text edit. Any recommendations out there? Thanks!

How about something like:

int yourSparkFunction(String args) {
    args.replace("%20", " "); // replaces all instances of %20 with a space
    // your code
    return 1;

BDub that worked, exactly what I needed, thanks!

1 Like