16.1. Miscellaneous

16.1.1. String Comparison
16.1.2. Function EXT:STRING-WIDTH
16.1.3. Functions EXT:STRING-INVERTCASE and EXT:NSTRING-INVERTCASE

16.1.1. String Comparison

String comparison (STRING< and friends) is based on the function CHAR<= (see Section 13.9, “Ordering of Characters ”). Therefore diphthongs do not obey the usual national rules. Example: o < oe < z < ö.

16.1.2. Function EXT:STRING-WIDTH

(EXT:STRING-WIDTH string &KEY start end) returns the number of screen columns occupied by string. This is computed as the sum of all EXT:CHAR-WIDTHs of all of the string's characters:

(REDUCE #'+ string :KEY #'EXT:CHAR-WIDTH)

(EXT:STRING-INVERTCASE string &KEY start end) and (EXT:NSTRING-INVERTCASE string &KEY start end) are similar to STRING-UPCASE et al: they use EXT:CHAR-INVERTCASE to invert the case of each characters in the argument string region.


These notes document CLISP version 2.49Last modified: 2010-07-07