emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115287: * lisp/emacs-lisp/helpers.el (string-empty-


From: Bozhidar Batsov
Subject: [Emacs-diffs] trunk r115287: * lisp/emacs-lisp/helpers.el (string-empty-p): New function.
Date: Fri, 29 Nov 2013 16:52:32 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115287
revision-id: address@hidden
parent: address@hidden
committer: Bozhidar Batsov <address@hidden>
branch nick: master
timestamp: Fri 2013-11-29 18:51:44 +0200
message:
  * lisp/emacs-lisp/helpers.el (string-empty-p): New function.
  (string-blank-p): New function
modified:
  etc/NEWS                       news-20100311060928-aoit31wvzf25yr1z-1
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/helpers.el     helpers.el-20131104130751-8dd4wji5crsqfatf-1
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2013-11-26 15:24:10 +0000
+++ b/etc/NEWS  2013-11-29 16:51:44 +0000
@@ -787,6 +787,8 @@
 ** New library helpers.el for misc helper functions
 *** `hash-table-keys'
 *** `hash-table-values'
+*** `string-blank-p`
+*** `string-empty-p`
 *** `string-join`
 *** `string-reverse`
 *** `string-trim-left'

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-11-29 14:31:20 +0000
+++ b/lisp/ChangeLog    2013-11-29 16:51:44 +0000
@@ -1,3 +1,8 @@
+2013-11-29  Bozhidar Batsov  <address@hidden>
+
+       * emacs-lisp/helpers.el (string-empty-p): New function.
+       (string-blank-p): New function.
+
 2013-11-29  Andreas Politz  <address@hidden>
 
        * imenu.el (imenu--index-alist): Add missing dot to the docstring

=== modified file 'lisp/emacs-lisp/helpers.el'
--- a/lisp/emacs-lisp/helpers.el        2013-11-26 15:24:10 +0000
+++ b/lisp/emacs-lisp/helpers.el        2013-11-29 16:51:44 +0000
@@ -37,6 +37,10 @@
     (maphash (lambda (_k v) (push v values)) hash-table)
     values))
 
+(defsubst string-empty-p (string)
+  "Check whether STRING is empty."
+  (string= string ""))
+
 (defsubst string-join (strings &optional separator)
   "Join all STRINGS using SEPARATOR."
   (mapconcat 'identity strings separator))
@@ -61,6 +65,10 @@
   "Remove leading and trailing whitespace from STRING."
   (string-trim-left (string-trim-right string)))
 
+(defsubst string-blank-p (string)
+  "Check whether STRING is either empty or only whitespace."
+  (string-empty-p (string-trim string)))
+
 (provide 'helpers)
 
 ;;; helpers.el ends here


reply via email to

[Prev in Thread] Current Thread [Next in Thread]