CSharpUtilities::StringUtilities Class Reference


Detailed Description

Useful general utilites for working with strings.

List of all members.

Public Member Functions

static int  StrCmpLogicalW (string psz1, string psz2)
  P/Invokes native method for string ordering like in Windows Explorer.

Static Public Member Functions

static String  Join (String delimiter, IList list)
  Joins the string representations of all Items in a list, separated by a delimiter, into a single string.

Member Function Documentation

static String CSharpUtilities::StringUtilities::Join ( String  delimiter,
IList  list 
) [inline, static]

Joins the string representations of all Items in a list, separated by a delimiter, into a single string.

Works like System.String.Join, except on a list of arbitrary objects. Each item the list is transformed into a string using ToString, and then these string representations are joined as with System.String.Join.

Parameters:
delimiter String placed between each individual item in the list.
list List of objects whose string representations will be joined.
Returns:
A single string composed of the string representations of all Items in list, separated by delimiter.
static int CSharpUtilities::StringUtilities::StrCmpLogicalW ( string  psz1,
string  psz2 
)

P/Invokes native method for string ordering like in Windows Explorer.

Compares two Unicode strings. Digits in the strings are considered as numerical content rather than text. This test is not case sensitive.

Using P/Invoke here and letting the platform deal with marshalling the strings in much simpler than trying to do everything manually.

Parameters:
psz1 A pointer to the first null-terminated string to be compared.
psz2 A pointer to the second null-terminated string to be compared.
Returns:
Returns zero if the strings are identical. Returns 1 if the string pointed to by psz1 has a greater value than that pointed to by psz2. Returns -1 if the string pointed to by psz1 has a lesser value than that pointed to by psz2. /returns>

CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities
CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities CSharpUtilities::StringUtilities