KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to filter out empty strings to put them into an Option. So I quickly built this now: def StrictOption(s: String) = s match { case s if s != null && s.trim.length() > 0 => Some(s) case _ => None } Question: is this maybe already somewhere in the standard library?
Tags (comma-separated)
Save Edits
Cancel