diff options
author | Johan Andersson <johan.rejeep@gmail.com> | 2013-09-04 20:01:54 +0200 |
---|---|---|
committer | Johan Andersson <johan.rejeep@gmail.com> | 2013-09-04 20:01:54 +0200 |
commit | aac4a2faff9fb5f61983aaf95f6c2a5f7b354d9f (patch) | |
tree | 5d0a6c501c465bda381301a8aa2d47455a350591 /s.el | |
parent | 7db17c807492aa74390f115aaeb6ac22deda9bda (diff) |
Add s-present?
Diffstat (limited to 's.el')
-rw-r--r-- | s.el | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -264,6 +264,10 @@ This is a simple wrapper around the built-in `string-match-p'." "Is S nil or the empty string?" (or (null s) (string= "" s))) +(defun s-present? (s) + "Is S anything but nil or the empty string?" + (not (s-blank? s))) + (defun s-presence (s) "Return S if it's not `s-blank?', otherwise return nil." (unless (s-blank? s) s)) |