/[RomCheater]/trunk/RomCheater.UserSettingsSupport/StringUtil.cs
ViewVC logotype

Contents of /trunk/RomCheater.UserSettingsSupport/StringUtil.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 722 - (show annotations) (download)
Tue Jun 18 19:18:05 2013 UTC (7 years, 5 months ago) by william
File size: 977 byte(s)

1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5
6 namespace RomCheater.UserSettingsSupport
7 {
8 internal static class StringUtil
9 {
10 // Parts from System.Configuration.StringUtil
11 internal static bool StringStartsWithIgnoreCase(string s1, string s2)
12 {
13 if (string.IsNullOrEmpty(s1) || string.IsNullOrEmpty(s2))
14 {
15 return false;
16 }
17 if (s2.Length > s1.Length)
18 {
19 return false;
20 }
21 return (0 == string.Compare(s1, 0, s2, 0, s2.Length, StringComparison.OrdinalIgnoreCase));
22 }
23 internal static bool StartsWithIgnoreCase(string s1, string s2)
24 {
25 if (s2 == null)
26 {
27 return false;
28 }
29 return (0 == string.Compare(s1, 0, s2, 0, s2.Length, StringComparison.OrdinalIgnoreCase));
30 }
31 }
32 }

  ViewVC Help
Powered by ViewVC 1.1.22