[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
STRING-REVERSE-SEARCH-NOT-SET, and effect upon STRING-RIGHT-TRIM
- To: DCP at MIT-MC
- Subject: STRING-REVERSE-SEARCH-NOT-SET, and effect upon STRING-RIGHT-TRIM
- From: Jon L White <JONL at MIT-MC>
- Date: Wed, 11 Nov 81 01:50:00 GMT
- Cc: BUG-LISP at MIT-MC
- Original-date: 10 November 1981 20:50-EST
Date: 20 September 1981 16:26-EDT
From: David C. Plummer <DCP at MIT-MC>
Subject: Why can't things ever be tested? Or, Doesn't anybody else
use strings (if they are, why is this breaking for me)?
In the current string package...
(string-right-trim '(#\space) "this is a test ")
"this is a test "
;; STRING-LEFT-TRIM and STRING-TRIM both trim from the left, but
;; even STRING-TRIM doesn't trim from the right.
Fixed as of STRAUX version 74.
Sorry for waiting so long to answer this one -- indeed it sounds like
these two functions (STRING-RIGHT-TRIM and STRING-TRIM) aren't used
by anybody else. The culprit was a fence-post-error-by-1 in the
default calculation of the 'limit' argument to STRING-REVERSE-SEARCH-NOT-SET
(works ok when user supplies that arg). It turns out that STRING-RIGHT-TRIM
calls STRING-REVERSE-SEARCH-NOT-SET, and was getting this wrong value
back . . .