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

[no subject]



In System 78.33, ZMail 38.5, ... microcode 836, ... on Lisp Machine Twenty-two:

Is it a feature of STRING-RIGHT-TRIM (and SUBSTRING, for that matter) return
copies of the input string rather than the original in the case where a string
EQUAL to the input is to be generated? That seems pretty wasteful since the
string cons'd might be long and it may be that the odds are in favor of there
not being anything to get stripped anyway.

 (LET ((A "FOO")) (EQ A (SUBSTRING A 0 3))) should return T.

There should be a COPYSTRING function available for people who need a fresh
copy of the string. Similarly,

 (LET ((A "FOO")) (EQ (STRING-RIGHT-TRIM "0123456789" A) A)) should return T.