From b7fa6cca42f72fe79ce3771dbfb45e7e49cddbd2 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 6 Dec 2001 00:01:24 +0000 Subject: Vamsi & Praveen contributed MatchIgnoreCase. --- src/StyleContext.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/StyleContext.h b/src/StyleContext.h index 5bc6371fd..343c81972 100644 --- a/src/StyleContext.h +++ b/src/StyleContext.h @@ -113,6 +113,20 @@ public: } return true; } + bool MatchIgnoreCase(const char *s) { + if (tolower(ch) != *s) + return false; + s++; + if (tolower(chNext) != *s) + return false; + s++; + for (int n=2; *s; n++) { + if (*s != tolower((styler.SafeGetCharAt(currentPos+n)))) + return false; + s++; + } + return true; + } // Non-inline void GetCurrent(char *s, int len); void GetCurrentLowered(char *s, int len); -- cgit v1.2.3