Oh my bad, i thought that string were supported in the switch statements but it looks like no.
I was reading this thread : https://forum.processing.org/two/discussion/15489/string-comparison-else-if-or-switch . and they mention that you can use a hashMap to assign an index to every string. https://processing.org/reference/HashMap.html
At the end, i don’t know if this will be more troublesome rather than use the if else statement.