Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readLine and readStringUntil shouldn't return search characters? #9

Open
vanevery opened this issue Oct 2, 2015 · 2 comments
Open
Labels

Comments

@vanevery
Copy link
Member

vanevery commented Oct 2, 2015

No description provided.

@vanevery
Copy link
Member Author

vanevery commented Oct 3, 2015

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

@tigoe
Copy link
Contributor

tigoe commented Oct 4, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants