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

Add ssv.blank method #46

Merged
merged 1 commit into from
Mar 28, 2020
Merged

Add ssv.blank method #46

merged 1 commit into from
Mar 28, 2020

Conversation

ryanve
Copy link
Owner

@ryanve ryanve commented Mar 28, 2020

Simple method for sweeter code

@ryanve
Copy link
Owner Author

ryanve commented Mar 28, 2020

examples

ssv.blank("travis") // false
ssv.blank("      ") // true
ssv.blank("") // true

@ryanve
Copy link
Owner Author

ryanve commented Mar 28, 2020

ssv.blank(string) equals !ssv.count(string)

Use whichever vibes best with your code

blank is faster

@ryanve
Copy link
Owner Author

ryanve commented Mar 28, 2020

Java strings have a blank method called isBlank that works the same

Returns true if the string is empty or contains only white space codepoints, otherwise false.

@ryanve ryanve merged commit 7639349 into master Mar 28, 2020
@ryanve ryanve deleted the blank branch March 28, 2020 20:06
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant