17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

515<br />

string><br />

The Common Lisp equivalent to <strong>zl</strong>:string= is the function:<br />

string:<br />

string> stringl string2 &key (startl 0) (endl nil) (start2 0) (end2 Function<br />

nil)<br />

This is a comparison predicate that compares two strings or substrings of<br />

them, exactly, depending on all fields including modifier bits, character set,<br />

character style, and alphabetic case.<br />

string> returns nil unless stringl is greater than string2. If the condition<br />

is satisfied, string> returns the position within the strings of the first<br />

character at which the strings fail to match; this index is equivalent to the<br />

length of the longest common portion of the strings.<br />

stringl and string2 must be strings, or objects that can be coerced to<br />

strings. See the function string, page 502.<br />

The keywords let you specify substrings of the two string arguments for<br />

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

into the string array.<br />

:startl<br />

:endl<br />

:start2 and :end2<br />

Specifies the position within stringl from which to<br />

begin the comparison (counting from 0). Default<br />

is 0, the first character in the string. :startl<br />

must be S :endl.<br />

Specifies the position within stringl of the first<br />

character beyond the end of the comparison.<br />

Default is nil, that is, the operation continues to<br />

the end of the string.<br />

Work in analogous fashion for string2.<br />

The case-insensitive version of string> is the predicate string-greaterp.<br />

Examples:<br />

(string> "apple" "apple") => NIL<br />

(string> "true" "TRUE") => e<br />

(string> "arm" "aim") => 1<br />

(string> "puppet" "puz<strong>zl</strong>e") => NIL<br />

(string> "book" "ball" :start1 1 :start2 2 :end2 3) => 1<br />

For a table of related items: See the section "Case-Sensitive String Comparison<br />

Predicates" in Symbolics Common Lisp: Language Concepts.<br />

<strong>zl</strong>:string> stringl string2 &optional (idxl 0) (idx2 0) liml lim2 Function<br />

This is a comparison predicate that compares two strings or substrings of<br />

them, exactly, depending on all fields including bits, style, and alphabetic<br />

case.

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

Saved successfully!

Ooh no, something went wrong!