DIRECTOR: LINGO: Ignore diacritics in = operator

This commit is contained in:
djsrv 2020-04-19 14:25:12 -04:00 committed by Eugene Sandulenko
parent ba26ec684b
commit 90661dbd11
2 changed files with 9 additions and 1 deletions

View File

@ -31,6 +31,7 @@
#include "director/frame.h"
#include "director/score.h"
#include "director/sprite.h"
#include "director/util.h"
namespace Director {
@ -601,7 +602,9 @@ int Datum::compareTo(Datum d) {
int Datum::compareToIgnoreCase(Datum d) {
if (type == STRING && d.type == STRING) {
return u.s->compareToIgnoreCase(*d.u.s);
Common::String *s1 = toLowercaseMac(u.s);
Common::String *s2 = toLowercaseMac(d.u.s);
return s1->compareTo(*s2);
}
return compareTo(d);
}

View File

@ -11,6 +11,11 @@ if z1 contains "Me
else
put "Doesn't contain"
end if
if "meow" = "MeÍW" then
put "Equals"
else
put "Doesn't equal"
end if
put "That is the last line of the file." & return & "Click Done to exit." && return && "foo"