17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

531 string-flipcase<br />

string-flip case string &key (start 0) (end nil) Function<br />

The function string-flip case returns a copy of string, with uppercase alphabetic<br />

characters replaced by the corresponding lowercase characters, and<br />

with lowercase alphabetic characters replaced by the corresponding uppercase<br />

characters.<br />

string is a string or an object that can be coerced to a string. See the<br />

function string, page 502.<br />

The keywords let you select portions of the string argument for case changing.<br />

These keyword arguments must be non-negative integer indices into<br />

the string array. The result is always the same length as string, however.<br />

:start Specifies the position within string from which to begin case changing<br />

(counting from 0). Default is 0, the first character in the<br />

string. :start must be ::;; :end.<br />

:end Specifies the position within string of the first character beyond the<br />

end of the case changing operation. Default is nil, that is, the<br />

operation continues to the end of the string.<br />

Examples:<br />

(string-flipcase "a sTrANGe UsE OF CaPitalS")<br />

=> "A StRangE uSe of cApITAls"<br />

(string-flipcase 'symbol) => "symbol"<br />

(string-flipcase 'symbol :start 2 :end 4) => "SYmbOL"<br />

(string-flipcase "End" :start 2) => "EnD"<br />

(string-flipcase "STRing") => "strING"<br />

The destructive version of string-flipcase is the function:<br />

nstring-flipcase<br />

For a table of related items: See the section "String Conversion" in Symbolics<br />

Common Lisp: Language Concepts.<br />

I<br />

<strong>zl</strong>:string-flipcase string &optional (from 0) to (copy-p t) Function<br />

This function reverses the alphabetic case in its argument: it changes uppercase<br />

alphabetic characters to lowercase and lowercase characters to uppercase.<br />

The effect on the original argument depends on the value of<br />

copy-p: if copy-p is not nil, a copy of string is returned; this is the default;<br />

if copy-p is nil, string itself is modified and returned.<br />

string is a string or an object that can be coerced to a string. See the<br />

function string, page 502.<br />

from is the index in string at which to begin exchanging the case of

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!