about summary refs log tree commit diff
path: root/configs/shared/.emacs.d/wpc/string.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-01-18T22·37+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-01-18T22·37+0000
commit068a648736c14a8670097dc4c715bc76dbcfe6e6 (patch)
treeb26410af1d0bca1fc8f76645a3f330c4e832fa75 /configs/shared/.emacs.d/wpc/string.el
parentfa681ffdf091143f85f83db21f54b3e374fd296f (diff)
Support string/contains?
Simple wrapper around s-contains? but in the interest of avoiding a mixture of
s.el and stirng.el functions, the wrapper was defined.
Diffstat (limited to 'configs/shared/.emacs.d/wpc/string.el')
-rw-r--r--configs/shared/.emacs.d/wpc/string.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/configs/shared/.emacs.d/wpc/string.el b/configs/shared/.emacs.d/wpc/string.el
index 1b766f5207a3..f8694d5f18a1 100644
--- a/configs/shared/.emacs.d/wpc/string.el
+++ b/configs/shared/.emacs.d/wpc/string.el
@@ -22,6 +22,10 @@
 (defconst string/test? t
   "When t, run the tests.")
 
+(defun string/contains? (c x)
+  "Return t if X is in C."
+  (s-contains? c x))
+
 (defun string/hookify (x)
   "Append \"-hook\" to X."
   (s-append "-hook" x))