X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=strings.lisp;h=7e9be34ce521f95c1a6c335a120b64dc10f6f7ef;hb=348010e5a810750c2e9dce31aae5524c5ed3aa4f;hp=94eaed406718924b34aca52e8cf03c02afe8880b;hpb=e9a26631dd34230ee2a06d8c850376ad5276c21e;p=kmrcl.git diff --git a/strings.lisp b/strings.lisp index 94eaed4..7e9be34 100644 --- a/strings.lisp +++ b/strings.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: strings.lisp,v 1.12 2003/04/29 00:43:56 kevin Exp $ +;;;; $Id: strings.lisp,v 1.16 2003/04/30 02:16:21 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -113,7 +113,14 @@ (let ((len (length s))) (if (plusp len) (subseq s 0 (1- len)) - s)) + s))) + +(defun nstring-trim-last-character (s) + "Return the string less the last character" + (let ((len (length s))) + (if (plusp len) + (nsubseq s 0 (1- len)) + s))) (defun string-hash (str &optional (bitmask 65535)) (let ((hash 0)) @@ -184,7 +191,7 @@ list of characters and replacement strings." (defun escape-xml-string (string) "Escape invalid XML characters" (substitute-chars-strings - string '((#\& . "&") (#\> . ">") (#\< . "<")))) + string '((#\& . "&") (#\> . ">") (#\< . "<") (#\" . """)))) (defun make-usb8-array (len)