XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

string-upcase


Type:   -   function (subr)
Source:   -   xlstr.c

Syntax

(string-upcase string [{:start | :end} offset] ... )
string - a string expression
offset - an optional integer expression for a keyword
returns - a converted copy of the string

Description

The 'string-upcase' function takes a string argument and returns a new string that has been made upper case.

The keyword arguments allow for accessing substrings within 'string'. The keyword arguments require a keyword ':start' or ':end' first and a single integer expression second. The ':start' keyword specifies the starting offset for the 'string-upcase' operation on 'string'. A value of 0 starts the string at the beginning [no offset]. The ':end' keyword specifies the end offset for the operation on 'string'.

Examples

(string-upcase "ABcd+-12&[")                ; returns "ABCD+-&["
(string-upcase "abcdefgh" :start 2 :end 4)  ; returns "abCDefgh"

(setq mystr "ABcdEFgh")       ; set up variable
(string-upcase mystr)         ; returns "ABCDEFGH"
(print mystr)                 ; prints  "ABcdEFgh"

See the string-upcase function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next