Help on understanding how Bridge reading and parsing works?

I'm trying to learn about parsing through the Bridge by studying the example, but I'm a little confused. When I modify the Bridge example to add another case:

void process(YunClient client) {
  // read the command
  String command = client.readStringUntil('/');

  // try out another command
  if (command == "start") {

  // is "digital" command?
  if (command == "digital") {

and then try to activate the start command with:

http://[IP of Yun]/arduino/start/

I get no response, but if I try:

http://[IP of Yun]/arduino/start/1 or http://[IP of Yun]/arduino/start/x

(or just something after the last /), it does print yes! in the browser.

I've looked at several posts on string and String and strcmp, but I don't yet have a sense of what's going on. Any pointers on what I'm doing incorrectly or suggestions of forum posts to look at? I'd like to be able to parse and act on various commands sent to the arduino side from a browser.


sorry for my bad english

I think, the function client.readStringUntil('/');

reads the String between the last slashes, thast why there must be a ".../1" on the end.

Ciao Peter

Grazie, Peter (il tuo inglese è meglio del mio italiano - I cheated and looked it up ;) ).

I found some interesting discussion on parsing inputs using String methods or C methods with characters here.