std-toupper, std-tolower


Synopsis

(std-toupper <int>) : change character to uppercase

(std-tolower <int>) ; change character to lowercase

Description

STD-TOUPPER and STD-TOLOWER are the actual workhorses for all string case change functions, like STD-STRCASE, STD-STRING-UPCASE, STD-STRING-DOWNCASE and STD-STRING-CAPITALIZE.

They work only with integer numbers (different to the predicates, which take strings also) and the are codepage sensitive. You may set a codepage different to the system codepage and change cases then. On the contrary strcase works only with the system codepage.

Both functions are redefined on codepage changes via STD-SYS-CODEPAGE.

Corresponding Common Lisp names: char-upcase, char-downcase

Note

Both functions are dependent on the current stdlib codepage, which defaults to "iso8859-1", Latin-1. It might be dynamically redefined when the codepage is changed. But this will only affect characters above (CHR 127).

Arguments

int: a integer number. So far only ranges between 0-255 are accepted. When AutoLISP will support unicode too it will accept numbers up to 32767.

Return Value

A integer number.

Side Effects

None.

Module

(std-require 'STDSTR)

Defined in STDSTR, it might be redefined in STDLOCAL