summaryrefslogtreecommitdiff
path: root/unotools/source/i18n/transliterationwrapper.cxx
diff options
context:
space:
mode:
authorEike Rathke <er@openoffice.org>2001-08-06 13:59:04 +0000
committerEike Rathke <er@openoffice.org>2001-08-06 13:59:04 +0000
commit34e6cf1a563e1229e5cf3b53d3a615b3b87f19b9 (patch)
treeef1f2c9f7c9ecbda361d2723c7817c6ed351e27c /unotools/source/i18n/transliterationwrapper.cxx
parent57bbb0c583ddd000b32c4a3e90332718a2b8b7c0 (diff)
#90249# moved inline isEqual()/isMatch() to implementation
Diffstat (limited to 'unotools/source/i18n/transliterationwrapper.cxx')
-rw-r--r--unotools/source/i18n/transliterationwrapper.cxx27
1 files changed, 25 insertions, 2 deletions
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();
+}