4539eddffdd355cc1fd561ae9e6fa66b8603f5d6
[mono.git] / mcs / class / FirebirdSql.Data.Firebird / FirebirdSql.Data.Common / GlobalizationHelper.cs
1 /*
2  *  Firebird ADO.NET Data provider for .NET and Mono 
3  * 
4  *     The contents of this file are subject to the Initial 
5  *     Developer's Public License Version 1.0 (the "License"); 
6  *     you may not use this file except in compliance with the 
7  *     License. You may obtain a copy of the License at 
8  *     http://www.firebirdsql.org/index.php?op=doc&id=idpl
9  *
10  *     Software distributed under the License is distributed on 
11  *     an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either 
12  *     express or implied.  See the License for the specific 
13  *     language governing rights and limitations under the License.
14  * 
15  *  Copyright (c) 2002, 2005 Carlos Guzman Alvarez
16  *  All Rights Reserved.
17  */
18
19 using System;
20 using System.Globalization;
21
22 namespace FirebirdSql.Data.Common
23 {
24         internal class GlobalizationHelper
25         {
26                 #region Constructors
27
28                 private GlobalizationHelper()
29                 {
30                 }
31
32                 #endregion
33
34                 #region Static Methods
35
36                 public static bool CultureAwareCompare(string strA, string strB)
37                 {
38                         return CultureInfo.CurrentCulture.CompareInfo.Compare(
39                                 strA,
40                                 strB,
41                                 CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth |
42                                 CompareOptions.IgnoreCase) == 0 ? true : false;
43                 }
44
45                 #endregion
46         }
47 }