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 string.IsNullOrEmpty and string.IsNullOrWhitespace #2155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marchc1
Copy link

@marchc1 marchc1 commented Nov 20, 2024

No description provided.

@robotboy655 robotboy655 added the Addition The pull request adds new functionality. label Nov 20, 2024
@marchc1
Copy link
Author

marchc1 commented Nov 20, 2024

Could rename them to IsNilOr(X) if you want to use Lua terminology rather than null

@garryspins
Copy link

Feel like a pattern is a little unneeded here

@marchc1
Copy link
Author

marchc1 commented Nov 20, 2024

Feel like a pattern is a little unneeded here

What would you do differently, since I wanted it to catch all whitespace characters (newlines, return carriage, tabs, etc). Figured a pattern would be most efficient for that

@garryspins
Copy link

I guess if this is intended to be used on a string and not just a char that's valid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Addition The pull request adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants