diff options
author | guobao.jiang <loveaborn@foxmail.com> | 2016-09-22 09:49:42 +0800 |
---|---|---|
committer | guobao.jiang <loveaborn@foxmail.com> | 2016-09-22 09:49:42 +0800 |
commit | aa8571304c7cb85cdf814d3fc42bfe38577bfbbb (patch) | |
tree | 29d8dd076d5e2774d49c8d8b75c1f5105cea5046 /s.el | |
parent | a767c1c04c3accef0bdd5e7e785f6dbee6dd85b8 (diff) |
add s-blank-str?
Diffstat (limited to 's.el')
-rw-r--r-- | s.el | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -292,6 +292,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-blank-str? (s) + "Is S nil or the empty string or string only contains whitespace?" + (or (s-blank? s) (s-blank? (s-trim s)))) + (defun s-present? (s) "Is S anything but nil or the empty string?" (not (s-blank? s))) |