Logo

Programming-Idioms

Set the boolean ok to true if the string s is the same as the string t, ignoring case considerations, or to false otherwise.

Two strings are considered equal ignoring case if they are of the same length and corresponding characters in the two strings are equal ignoring case.
New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
import "strings"
ok := strings.EqualFold(s, t)
boolean b = s.equalsIgnoreCase(t);
SysUtils
ok := CompareText(s,t) = 0;
b = s.casefold() == t.casefold()