Next Previous Up Top Contents Index

3.2 The TABLE-EXTENSIONS module

case-insensitive-equal

Function

Summary

Compares two strings for equality, ignoring case differences between them.

Library

common-extensions

Module

table-extensions

Signature

case-insensitive-equal string1 string2 => boolean 

Arguments

string1
An instance of <string>.

string2
An instance of <string>.

Values

boolean
An instance of <boolean>.

Description

Compares string1 and string2 for equality, ignoring any case differences between them. Returns true if they are equal and false otherwise.

The function has the same behavior as Dylan's standard method on = for sequences, except that when comparing alphabetical characters, it ignores any case differences.

This function is used as an equivalence predicate by case-insensitive-string-hash.

This function uses as-uppercase or as-lowercase to convert the characters in its string arguments.

Example

The case-insensitive-equal function returns true if passed the following strings:

"The Cat SAT ON the Mat"
"The cat sat on the Mat"

Conversely, the standard method on = returns false when passed those strings.

See also

case-insensitive-string-hash, page 67


Common Dylan and Functional Extensions - 31 Mar 00

Next Previous Up Top Contents Index