Table of Contents

Class StringUtil

Namespace
NUnit.Framework.Internal
Assembly
nunit.framework.dll

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 string

The first string.

strB string

The second string..

ignoreCase bool

if 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 string

The first string.

strB string

The second string..

ignoreCase bool

if set to true, the case of the letters in the strings is ignored.

Returns

bool

True if the strings are equivalent, false if not.