The 'string-not-equal' function takes two string arguments. A non-NIL value is returned if 'string1' is not equal to 'string2', otherwise NIL is returned. The non-NIL value returned is the integer index of the first character of 'string1' which is char-not-equal to the corresponding character of 'string2'. This test is not case sensitive, the character '#\a' is considered to be the same as '#\A'.
The keyword arguments allow for accessing substrings within 'string1' and 'string2'. The keyword arguments each require a keyword ':start1', ':end1', ':start2' or ':end2' and a single integer expression as a pair with the keyword first and the integer second. The pairs may be in any order. The ':startN' keywords specify the starting offset of the substring. A value of 0 starts the string at the beginning [no offset]. The ':endN' keywords specify the ending offset of the substring. A value of 3 ends the string after the 3rd character [an offset of 3 characters].
(string-not-equal "a" "b") ; returns 0 (string-not-equal "a" "a") ; returns NIL (string-not-equal "a" "A") ; returns NIL (string-not-equal "A" "a") ; returns NIL (string-not-equal "abc" "abc ") ; returns 3 (string-not-equal "J Smith" "K Smith" :start1 1 :start2 1) ; strip off the first chars ; returns NIL (string-not-equal "abc" "123456789" :end2 3 :end1 3) ; leave just the first 3 chars ; returns 0
Bug: The 'string-not-equal' function is listed in the original XLISP documentation as 'string-not-equalp'. In the XLISP interpreter a call to 'string-not-equalp' causes an error:
error: unbound function - STRING-NOT-EQUALP
The 'string-not-equal' function works exactly as the 'string-not-equalp'
function described in the XLISP manual. This bug had obviously been
corrected in the manual only but never in the interpreter. As the bug still
exists with
See the
string-not-equal
function in the