Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

nstring-upcase

nstring-upcase

type: function (subr) 
location: built-in
source file: xlstr.c
Common LISP compatible: yes
supported on: all machines

SYNTAX

(nstring-upcase <string> [ { :start | :end }  ] ... )
        <string>        -       a string expression
        <offset>        -       an optional integer expression (for a keyword)

DESCRIPTION

The NSTRING-UPCASE function takes a string argument and makes it upper case. This function modifies the string (or string variable itself) - it does not just make a copy. The upper case string is returned.

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 NSTRING-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

(nstring-upcase "ABcd+-12&[")           ; returns "ABCD+-&["
(nstring-upcase "abcdefgh"              ;
                 :start 2 :end 4)       ; returns "abCDefgh"
                                        ;
(setq mystr "ABcdEFgh")                 ; set up variable
(nstring-upcase mystr)                  ; returns "ABCDEFGH"
(print mystr)                           ; prints  "ABCDEFGH"
                                        ; note that MYSTR is modified


Go to the first, previous, next, last section, table of contents.