projects
/
kmrcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r4705: Auto commit for Debian build
[kmrcl.git]
/
strings.lisp
diff --git
a/strings.lisp
b/strings.lisp
index a348ed5211af5fb91491d624f1798f3a343b71bf..404f33a6f9bed2e6998f345bee8433ced42a3555 100644
(file)
--- a/
strings.lisp
+++ b/
strings.lisp
@@
-7,7
+7,7
@@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Apr 2000
;;;;
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Apr 2000
;;;;
-;;;; $Id: strings.lisp,v 1.1
1 2003/04/29 00:23:21
kevin Exp $
+;;;; $Id: strings.lisp,v 1.1
5 2003/04/29 15:25:22
kevin Exp $
;;;;
;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
;;;;
;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
@@
-110,9
+110,17
@@
(defun string-trim-last-character (s)
"Return the string less the last character"
(defun string-trim-last-character (s)
"Return the string less the last character"
- (aif (plusp (length s))
- (subseq s 0 (1- it))
- s))
+ (let ((len (length s)))
+ (if (plusp len)
+ (subseq s 0 (1- len))
+ 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))
(defun string-hash (str &optional (bitmask 65535))
(let ((hash 0))
@@
-183,7
+191,7
@@
list of characters and replacement strings."
(defun escape-xml-string (string)
"Escape invalid XML characters"
(substitute-chars-strings
(defun escape-xml-string (string)
"Escape invalid XML characters"
(substitute-chars-strings
- string '((#\& . "&") (#\> . ">") (#\< . "<"))))
+ string '((#\& . "&") (#\> . ">") (#\< . "<")
(#\" . """
)))
(defun make-usb8-array (len)
(defun make-usb8-array (len)