Namespaces

Types

Type StringHelper

Namespace NHibernate.Util

Methods

Fields

Public instance methods

bool Equals(object obj)

Parameters
return bool
object obj

int GetHashCode()

Parameters
return int

Type GetType()

Parameters
return Type

string ToString()

Parameters
return string

Public static methods

String[] Add(String[] x, string sep, String[] y)

Parameters
return String[]
String[] x
string sep
String[] y

bool BooleanValue(string value)

Converts a String in the format of "true", "t", "false", or "f" to a Boolean .
Parameters
return bool The value converted to a Boolean .
string value The string to convert.

int CountUnquoted(string str, Char character)

Counts the unquoted instances of the character.
Parameters
return int
string str
Char character

bool EqualsCaseInsensitive(string a, string b)

Parameters
return bool
string a
string b

int FirstIndexOfChar(string sqlString, string str, int startIndex)

Parameters
return int
string sqlString
string str
int startIndex

string GenerateAlias(string description)

Parameters
return string
string description

string GenerateAlias(string description, int unique)

Generate a nice alias for the given class name or collection role name and unique integer. Subclasses do have to use aliases of this form.
Parameters
return string an alias of the form foo1_
string description
int unique

string GetClassname(string typeName)

Takes a fully qualifed type name (can include the assembly) and just returns the name of the Class.
Parameters
return string
string typeName

string GetFullClassname(string typeName)

Takes a fully qualified type name and returns the full name of the Class - includes namespaces.
Parameters
return string
string typeName

int IndexOfCaseInsensitive(string source, string value, int startIndex)

Parameters
return int
string source
string value
int startIndex

int IndexOfCaseInsensitive(string source, string value, int startIndex, int count)

Parameters
return int
string source
string value
int startIndex
int count

int IndexOfCaseInsensitive(string source, string value)

Parameters
return int
string source
string value

string InternedIfPossible(string str)

Returns the interned string equal to if there is one, or otherwise.
Parameters
return string A String
string str A String

bool IsEmpty(string str)

Parameters
return bool
string str

bool IsNotEmpty(string str)

Parameters
return bool
string str

bool IsNotEmpty(SqlString str)

Parameters
return bool
SqlString str

string Join(string separator, IEnumerable objects)

Parameters
return string
string separator
IEnumerable objects

SqlString Join(SqlString separator, IEnumerable objects)

Parameters
return SqlString
SqlString separator
IEnumerable objects

int LastIndexOfCaseInsensitive(string source, string value)

Parameters
return int
string source
string value

int LastIndexOfLetter(string str)

Parameters
return int
string str

string MoveAndToBeginning(string filter)

Parameters
return string
string filter

String[] Multiply(string str, IEnumerator placeholders, IEnumerator replacements)

Parameters
return String[]
string str
IEnumerator placeholders
IEnumerator replacements

String[] Multiply(String[] strings, string placeholder, String[] replacements)

Parameters
return String[]
String[] strings
string placeholder
String[] replacements

String[] Prefix(String[] columns, string prefix)

Parameters
return String[]
String[] columns
string prefix

string Qualifier(string qualifiedName)

Parameters
return string
string qualifiedName

string Qualify(string prefix, string name)

Parameters
return string
string prefix
string name

String[] Qualify(string prefix, String[] names)

Parameters
return String[]
string prefix
String[] names

string Repeat(string str, int times)

Parameters
return string
string str
int times

string Replace(string template, string placeholder, string replacement)

Parameters
return string
string template
string placeholder
string replacement

string ReplaceOnce(string template, string placeholder, string replacement)

Parameters
return string
string template
string placeholder
string replacement

string Root(string qualifiedName)

Parameters
return string
string qualifiedName

String[] Split(string separators, string list, bool include)

Splits the String using the StringTokenizer.
This is more powerful than Split because you have the option of including or not including the seperators in the tokens.
Parameters
return String[]
string separators separators for the tokens of the list
string list the string that will be broken into tokens
bool include true to include the seperators in the tokens.

String[] Split(string separators, string list)

Just a façade for calling string.Split() We don't use our StringTokenizer because string.Split() is more efficient (but it only works when we don't want to retrieve the delimiters)
Parameters
return String[]
string separators separators for the tokens of the list
string list the string that will be broken into tokens

bool StartsWithCaseInsensitive(string source, string prefix)

Parameters
return bool
string source
string prefix

string Suffix(string name, string suffix)

Parameters
return string
string name
string suffix

String[] Suffix(String[] columns, string suffix)

Parameters
return String[]
String[] columns
string suffix

string ToString(Object[] array)

Parameters
return string
Object[] array

string Truncate(string str, int length)

Parameters
return string
string str
int length

string Unqualify(string qualifiedName)

Parameters
return string
string qualifiedName

string Unqualify(string qualifiedName, string seperator)

Parameters
return string
string qualifiedName
string seperator

string UnqualifyEntityName(string entityName)

Parameters
return string
string entityName

string Unroot(string qualifiedName)

Parameters
return string
string qualifiedName

Public fields

string WhiteSpace

return string

Char Dot

return Char

Char Underscore

return Char

string CommaSpace

return string

string Comma

return string

string OpenParen

return string

string ClosedParen

return string

Char SingleQuote

return Char

string NamePrefix

return string

string SqlParameter

return string

int AliasTruncateLength

return int