p5.serialserver
p5.serialserver copied to clipboard
readLine and readStringUntil shouldn't return search characters?
Hmmn.. I think that the issue isn't that it is returning the search characters, it is retuning an empty string when the search characters aren't found. If this isn't the appropriate behavior, what should the appropriate behavior be?
@lmccart @shiffman @tigoe
I'd take a look at how Processing implements these and do the same. I believe readStringUntil(x) returns x as well as the string that comes before it. This is why I usually trim() the results of it. There are times when you need the delimiter (which I assume is what you mean by search) characters.
readLine() on the other hand, I think should automatically trim any newline or return. Though there may be use cases where that's a bad idea. Can anyone thing of one?