ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.UserSettingsSupport/StringUtil.cs
Revision: 722
Committed: Tue Jun 18 19:18:05 2013 UTC (9 years, 7 months ago) by william
File size: 977 byte(s)
Log Message:

File Contents

# Content
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 }