X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=strings.lisp;h=9c031164a11b1adede58e4811314baf0d46addc0;hp=66c587b6969e0ab5b24a6bec843e3ecff37ef24e;hb=a377884abb0f3f36a67d335214bf2936b7c32070;hpb=7c7e6a18fd67e5370fd78690da2642cbe79e4113 diff --git a/strings.lisp b/strings.lisp index 66c587b..9c03116 100644 --- a/strings.lisp +++ b/strings.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: strings.lisp,v 1.45 2003/06/20 08:35:22 kevin Exp $ +;;;; $Id: strings.lisp,v 1.46 2003/07/08 00:12:51 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -492,3 +492,14 @@ for characters in a string" (character (string v)) (symbol (symbol-name v)) (otherwise (write-to-string v)))) + +(defun string-left-trim-one-char (char str) + (declare (simple-string str)) + (let* ((len (length str)) + (last (1- len))) + (declare (fixnum len last)) + (if (char= char (schar str last)) + (subseq str 0 last) + str))) + +