WX5.Text Class Reference

Some simple but still useful text processing methods. More...

List of all members.

Public Types

enum  TextCase { tcNone, tcAllLower, tcAllUpper, tcFirstUpper }
 

Text case type for WX5.Text.ChangeCase() method.

More...

Static Public Member Functions

static string ChangeCase (string source, TextCase textCase)
 Chnges the case of the given string.
static string GetLongest (IList< string > values)
 Selects the longest string from the string list.
static string GetLongest (params string[] values)
 Selects the longest string from the strings.
static string GetShortest (IList< string > values)
 Selects the shortest string from the string list.
static string GetShortest (params string[] values)
 Selects the shortest string from the strings.
static string ToString (string delimiter, IList< string > source)
 Concatenates a list of strings via delimeter.
static string ToString (string delimiter, IList< object > source)
 Concatenates a list of objects (using .ToString() method) via delimeter.
static string ToString (string delimiter, params string[] source)
 Concatenates an array of strings via delimeter.
static string ToString (string delimiter, params object[] source)
 Concatenates an array of objects (using .ToString() method) via delimeter.
static int IsMatch (string source, IList< string > patterns)
 Matches a string with a list of regular expressions and returns a zero-based index of matched expression. The case of each pattern is ignored.
static int IsMatch (string source, params string[] patterns)
 Matches a string with a list of regular expressions and returns a zero-based index of matched expression. The case of each pattern is ignored.
static double CompareFast (string str1, string str2)
 (Experimental) Fuzzy comparison, approach 1
static double Compare (string a, string b, int m)
 (Experimental) Fuzzy comparison, approach 2
static double Compare (string a, string b)
 (Experimental) Fuzzy comparison In dependence of length of inputs calls either WX5.Text.Compare(string a, string b, int m) or WX5.Text.CompareFast(string str1, string str2)

Static Public Attributes

static double CompareHighBound = 0.66
static double CompareLowBound = 0
static int ComparePartValue = 4

Detailed Description

Some simple but still useful text processing methods.


Member Enumeration Documentation

Text case type for WX5.Text.ChangeCase() method.

Enumerator:
tcNone 

No action.

tcAllLower 

Make all chars in the lower case.

tcAllUpper 

Make all chars in the upper case.

tcFirstUpper 

Make the 1st char in the upper case.


Member Function Documentation

static string WX5.Text.ChangeCase ( string  source,
TextCase  textCase 
) [static]

Chnges the case of the given string.

Parameters:
source source string
textCase the type of converstion
Returns:
the string with tha changed case
static double WX5.Text.Compare ( string  a,
string  b 
) [static]

(Experimental) Fuzzy comparison In dependence of length of inputs calls either WX5.Text.Compare(string a, string b, int m) or WX5.Text.CompareFast(string str1, string str2)

Parameters:
a string 1
b string 2
Returns:
the value from [0..1] where 1 means that a = b
static double WX5.Text.Compare ( string  a,
string  b,
int  m 
) [static]

(Experimental) Fuzzy comparison, approach 2

Parameters:
a 
b 
m 
Returns:
static double WX5.Text.CompareFast ( string  str1,
string  str2 
) [static]

(Experimental) Fuzzy comparison, approach 1

Parameters:
str1 
str2 
Returns:
static string WX5.Text.GetLongest ( params string[]  values  )  [static]

Selects the longest string from the strings.

Parameters:
values strings
Returns:
the longest string<
static string WX5.Text.GetLongest ( IList< string >  values  )  [static]

Selects the longest string from the string list.

Parameters:
values string list
Returns:
the longest string
static string WX5.Text.GetShortest ( params string[]  values  )  [static]

Selects the shortest string from the strings.

Parameters:
values strings
Returns:
the shortest string<
static string WX5.Text.GetShortest ( IList< string >  values  )  [static]

Selects the shortest string from the string list.

Parameters:
values string list
Returns:
the shortest string
static int WX5.Text.IsMatch ( string  source,
params string[]  patterns 
) [static]

Matches a string with a list of regular expressions and returns a zero-based index of matched expression. The case of each pattern is ignored.

Parameters:
source a string to be matched
patterns a list of regular expressions
Returns:
a zero-based index of matched expression, -1 otherwise
static int WX5.Text.IsMatch ( string  source,
IList< string >  patterns 
) [static]

Matches a string with a list of regular expressions and returns a zero-based index of matched expression. The case of each pattern is ignored.

Parameters:
source a string to be matched
patterns a list of regular expressions
Returns:
a zero-based index of matched expression, -1 otherwise
static string WX5.Text.ToString ( string  delimiter,
params object[]  source 
) [static]

Concatenates an array of objects (using .ToString() method) via delimeter.

Parameters:
delimiter delimiter string
source source array of objects
Returns:
a concatenated string
static string WX5.Text.ToString ( string  delimiter,
params string[]  source 
) [static]

Concatenates an array of strings via delimeter.

Parameters:
delimiter delimiter string
source source array of strings
Returns:
a concatenated string
static string WX5.Text.ToString ( string  delimiter,
IList< object >  source 
) [static]

Concatenates a list of objects (using .ToString() method) via delimeter.

Parameters:
delimiter delimiter string
source source list of objects
Returns:
a concatenated string
static string WX5.Text.ToString ( string  delimiter,
IList< string >  source 
) [static]

Concatenates a list of strings via delimeter.

Parameters:
delimiter delimiter string
source source list of strings
Returns:
a concatenated string
Generated on Wed Jun 2 01:15:47 2010 for WX Library 5.0 documentation by  doxygen 1.6.3