diff options
author | Johan Andersson <johan.rejeep@gmail.com> | 2014-09-10 12:04:21 +0200 |
---|---|---|
committer | Johan Andersson <johan.rejeep@gmail.com> | 2014-09-10 12:04:28 +0200 |
commit | 23abf1e2aea4997555ed8b8a8f5b6f9187cff711 (patch) | |
tree | c52ca66e2f8d8b7c59d48b7b1baf42073bab8fba /dev | |
parent | fec417a3fffcce8903c4eb3f415e3f5dcbd7348a (diff) |
Add s-wrap function
Diffstat (limited to 'dev')
-rw-r--r-- | dev/examples.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dev/examples.el b/dev/examples.el index 0531a31..44efe97 100644 --- a/dev/examples.el +++ b/dev/examples.el @@ -361,7 +361,12 @@ (defexamples s-count-matches (s-count-matches "a" "aba") => 2 (s-count-matches "a" "aba" 0 2) => 1 - (s-count-matches "\\w\\{2\\}[0-9]+" "ab1bab2frobinator") => 2)) + (s-count-matches "\\w\\{2\\}[0-9]+" "ab1bab2frobinator") => 2) + + (defexamples s-wrap + (s-wrap "foo" "\"") => "\"foo\"" + (s-wrap "foo" "(" ")") => "(foo)" + (s-wrap "foo" "bar") => "barfoobar")) (def-example-group "Pertaining to words" (defexamples s-split-words |