Class StringUtil
Provides methods to support legacy string comparison methods.
public class StringUtil
- Inheritance
-
StringUtil
- Inherited Members
Constructors
StringUtil()
public StringUtil()
Methods
Compare(string, string, bool)
Compares two strings for equality, ignoring case if requested.
public static int Compare(string strA, string strB, bool ignoreCase)
Parameters
strA
stringThe first string.
strB
stringThe second string..
ignoreCase
boolif set to
true
, the case of the letters in the strings is ignored.
Returns
- int
Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if strB is sorted first
StringsEqual(string, string, bool)
Compares two strings for equality, ignoring case if requested.
public static bool StringsEqual(string strA, string strB, bool ignoreCase)
Parameters
strA
stringThe first string.
strB
stringThe second string..
ignoreCase
boolif set to
true
, the case of the letters in the strings is ignored.
Returns
- bool
True if the strings are equivalent, false if not.