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.

527 <strong>zl</strong> :string-equal<br />

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

string-equal compares two strings, returning t if they are equal and nil if<br />

they are not. The comparison ignores character fields for character style<br />

and alphabetic case.<br />

<strong>zl</strong>:equal calls <strong>zl</strong>:string-equal if applied to two strings. stringl and string2<br />

are strings or objects that can be coerced to strings. See the function<br />

string, page 502.<br />

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

for comparison.<br />

idxl<br />

idx2<br />

liml<br />

lim2<br />

Examples:<br />

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

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

in the string.<br />

Specifies the position within string2 from which to begin the<br />

comparison. Default is O.<br />

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

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

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

Specifies the position within string2 of the first character beyond<br />

the end of the comparison. Default is nil.<br />

(<strong>zl</strong> :string-equal "Faa" "faa") => T<br />

(<strong>zl</strong> :string-equal "faa" "bar") => NIL<br />

(<strong>zl</strong> :string-equal "element" "select" 0 1 3 4) => T<br />

(<strong>zl</strong> :string-equal 'symbol "SYMBOL") => T<br />

(<strong>zl</strong> : string-equal "apple" "orange") => NIL<br />

(<strong>zl</strong> :string-equal "apple" "please" 2 0 nil 3) => T<br />

(<strong>zl</strong> :string-equal "apple" "APPLE") => T<br />

(<strong>zl</strong>:string-equal "apple" "apply") => NIL<br />

I<br />

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

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

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

string-equal<br />

string-exact-compare stringl string2 &key (startl 0) (start2 0) Function<br />

(endl nil) (end2 nil)<br />

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

them, exactly including the character fields for character style and alphabetic<br />

case.<br />

string-exact-compare returns:

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

Saved successfully!

Ooh no, something went wrong!