Skip to content

Commit

Permalink
Added docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
vasanthaganeshk committed Aug 24, 2017
1 parent f5aec03 commit f4ced3c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions haskell-string.el
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,20 @@ See also `haskell-string-take'."
str)

(defun haskell-string-split-to-lines (str)
"Split STR to lines and return a list of strings with preceeding and
succeding space removed."
(when (stringp str)
(cl-mapcar #'haskell-string-chomp (split-string str "\n"))))

(defun haskell-string-trim-prefix (prefix str)
"if prefix is present in string, the string is trimmed"
"If PREFIX is prefix of STR, the string is trimmed."
(when (and (stringp prefix)
(stringp str))
(if (string-prefix-p prefix str)
(substring str (length prefix)))))

(defun haskell-string-trim-suffix (suffix str)
"if suffix is present, the string is trimmed"
"If SUFFIX is suffix of STR, the string is trimmed."
(when (and (stringp suffix)
(stringp str))
(if (string-suffix-p suffix str)
Expand Down

0 comments on commit f4ced3c

Please sign in to comment.