16.1. The Strings Dictionary
Prev | Chapter 16. Strings | Next

## 16.1. The Strings Dictionary [sec_the_strings_dictionary]

### 16.1.1. String Comparison

String comparison (`STRING<` and friends) is based on the function `CHAR<=` (see Section 13.7, “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-WIDTH`s of all of the `string`'s characters:

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

### 16.1.3. Functions `EXT:STRING-INVERTCASE` and `EXT:NSTRING-INVERTCASE`

`(`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.45 | Last modified: 2008-04-15

Enter your search termsSubmit search form
Webclisp.cons.orgclisp.podval.orgwww.lisp.org

Prev | Up | Next
Chapter 16. Strings | Home | Chapter 17. Sequences