Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 874 Bytes

string-eq.md

File metadata and controls

9 lines (6 loc) · 874 Bytes

string=

(string= string1 string2 &key start1 end1 start2 end2)

Compares two strings character by character and returns t when they are exactly equal, nil otherwise. The comparison is case-sensitive, so "abc" and "ABC" are not equal; use string-equal for a case-insensitive test. :start1/:end1/:start2/:end2 bound the substrings actually compared. A nil :end1/:end2 means the length. A bound that is negative, not an integer (a nil :start1/:start2 included) or past the string's length, or a start past its end, signals the type-error subseq signals for the same range. The arguments, keyword values included, are evaluated once in the order the call spells them, and the first of a repeated keyword is the one used.

(list (string= "abc" "abc") (string= "together" "frog" :start1 1 :end1 3 :start2 2)) ; => (T T)