erbot-cvs
[Top][All Lists]
Advanced

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

[Erbot-cvs] Changes to erbot/erbutils.el


From: Pete Kazmier
Subject: [Erbot-cvs] Changes to erbot/erbutils.el
Date: Sat, 08 Jan 2005 11:47:26 -0500

Index: erbot/erbutils.el
diff -u erbot/erbutils.el:1.21 erbot/erbutils.el:1.22
--- erbot/erbutils.el:1.21      Sat Jan  8 04:08:16 2005
+++ erbot/erbutils.el   Sat Jan  8 16:33:02 2005
@@ -410,7 +410,11 @@
       "\n"))
    "\n"))
 
-
+(defun erbutils-cleanup-whitespace (str)
+  "Strip all leading whitespace and replace one or more tabs, newlines,
+or spaces with a single space."
+  (let ((result (replace-regexp-in-string "[\t\n ]+" " " str)))
+    (subseq result (or (position ?  result :test-not 'eq) 0))))
 
 (defun erbutils-downcase (str)
   (if (stringp str)




reply via email to

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