|
From: | Bozhidar Batsov |
Subject: | Re: [Emacs-diffs] trunk r115287: * lisp/emacs-lisp/helpers.el (string-empty-p): New function. |
Date: | Fri, 29 Nov 2013 23:29:57 +0200 |
> + (string= string ""))
I think `equal' is preferable since it avoids signaling an error if
STRING is not a string.
> +(defsubst string-blank-p (string)
> + "Check whether STRING is either empty or only whitespace."
> + (string-empty-p (string-trim string)))
Better use (string-match-p "\\`...\\'" string) to avoid allocating a new
string.
Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |