From 34e6cf1a563e1229e5cf3b53d3a615b3b87f19b9 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 6 Aug 2001 13:59:04 +0000 Subject: #90249# moved inline isEqual()/isMatch() to implementation --- unotools/source/i18n/transliterationwrapper.cxx | 27 +++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'unotools/source/i18n/transliterationwrapper.cxx') diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx index d07986b3251c..f3dc1aad6aff 100644 --- a/unotools/source/i18n/transliterationwrapper.cxx +++ b/unotools/source/i18n/transliterationwrapper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: transliterationwrapper.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: er $ $Date: 2001-07-10 17:30:42 $ + * last change: $Author: er $ $Date: 2001-08-06 14:58:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -286,3 +286,26 @@ sal_Int32 TransliterationWrapper::compareString( const String& rStr1, const Stri } return 0; } + + +// --- helpers -------------------------------------------------------- + +sal_Bool TransliterationWrapper::isEqual( const String& rStr1, const String& rStr2 ) const +{ + sal_Int32 nMatch1, nMatch2; + sal_Bool bMatch = equals( + rStr1, 0, rStr1.Len(), nMatch1, + rStr2, 0, rStr2.Len(), nMatch2 ); + return bMatch && nMatch1 == nMatch2 && nMatch1 == rStr1.Len() && + nMatch2 == rStr2.Len(); +} + + +sal_Bool TransliterationWrapper::isMatch( const String& rStr1, const String& rStr2 ) const +{ + sal_Int32 nMatch1, nMatch2; + sal_Bool bMatch = equals( + rStr1, 0, rStr1.Len(), nMatch1, + rStr2, 0, rStr2.Len(), nMatch2 ); + return bMatch && nMatch1 <= nMatch2 && nMatch1 == rStr1.Len(); +} -- cgit v1.2.3