-
Notifications
You must be signed in to change notification settings - Fork 165
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
Two helper methods #377
Two helper methods #377
Conversation
These two helper methods are in some other open source libraries but we don't always include those. It bugged me enough that I added them here. Signed-off-by: Aaron Rosenzweig <[email protected]>
Hang on... Aaron, does this differ significantly from stringIsNullOrEmpty()? If so, I don't see it, other than providing the converse method in the same patch. |
Hi Paul. If you feel strongly you can revert these changes, I don't feel that passionate that they have to be here. But to answer your question there is a difference between "empty" and "blank". The "stringIsNullOrEmpty()" does not trim a string. The two methods "isBlank" and "isNotBlank" are easier to read and use but of course, that is just opinion. |
Thanks for pointing out the use of |
I must admit that I didn't check if similar methods already existed. And yes, we should use the Apache Commons stuff wherever we can. |
Well, I've got nothing against Aaron, or his methods in particular, nor should this comment be taken to mean that I think that |
Sorry to see this is closed. I hand't a time to look but "isBlank" and "isNotBlank" isn't bad. |
Hey Ken! That I would like very much. I wasn't aware that "trim()" doesn't account for some unicode whitespace. |
There are a lot of problems, I will make an presentation about what can happen at WOWODC |
These two helper methods are in some other open source libraries but we don't always include those. It bugged me enough that I added them here.
Signed-off-by: Aaron Rosenzweig [email protected]