Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

feature request: nsstring isEmpty #30

Open
mgerlach-klick opened this issue Jul 23, 2013 · 4 comments
Open

feature request: nsstring isEmpty #30

mgerlach-klick opened this issue Jul 23, 2013 · 4 comments

Comments

@mgerlach-klick
Copy link

Would you consider adding an [NSString isEmpty] as described here: http://stackoverflow.com/a/899320 ?

@stanislaw
Copy link

I think, that isEmpty written this way is more like a method for something more general like NSObject. It is too expensive for NSString exclusively, isn't it?

@stanislaw
Copy link

Also, if we do know that thing responds to length and count - then why those casts to NSData and NSArray respectively?

@mgerlach-klick
Copy link
Author

That's true, I was mainly thinking of using it for nsstring, but this is really something for NSObject. Perhaps with the added [NSNull null] check mentioned in the comments?

BTW since I have you here: I love your library, thanks for your work!

@florianbuerger
Copy link

We can adopt something like Brent Simmon's emptiness functions http://inessential.com/2012/07/28/emptiness

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

No branches or pull requests

3 participants