summaryrefslogtreecommitdiff
path: root/s.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2013-08-20 16:01:23 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2013-08-20 16:01:23 +0100
commit0a35ab76538b5a41514ca2d374e4db6794e0e82e (patch)
tree34829e95ea8754471b118b299a3b4035c0043164 /s.el
parent1d8d638bd30d6b0ba90904b9835078d03933b001 (diff)
s-split-words now also splits ABc into A Bc
Diffstat (limited to 's.el')
-rw-r--r--s.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/s.el b/s.el
index 676b1c6..b34b3e1 100644
--- a/s.el
+++ b/s.el
@@ -406,7 +406,9 @@ When START is non-nil the search will start at that index."
(s-split
"[^[:lower:][:upper:]0-9]+"
(let ((case-fold-search nil))
- (replace-regexp-in-string "\\([[:lower:]]\\)\\([[:upper:]]\\)" "\\1 \\2" s))
+ (replace-regexp-in-string
+ "\\([[:lower:]]\\)\\([[:upper:]]\\)" "\\1 \\2"
+ (replace-regexp-in-string "\\([[:upper:]]\\)\\([[:upper:]][0-9[:lower:]]\\)" "\\1 \\2" s)))
t))
(defun s--mapcar-head (fn-head fn-rest list)