C# Class IdleLandsRedux.Common.StringHelper

Mostrar archivo Open project: IdleLands/IdleLandsRedux

Public Methods

Method Description
Capitalize ( this @string, int offset ) : string
ContainsAny ( this haystack ) : bool

Contains any of the given needles.

GetGenderPronoun ( string gender, string input ) : string

Gets the gender pronoun.

SanitizeString ( string str, bool punctuation = false ) : string

Sanitizes the string.

Private Methods

Method Description
ReplaceGenderPronoun ( this builder, string gender, string input ) : StringBuilder

Method Details

Capitalize() public static method

public static Capitalize ( this @string, int offset ) : string
@string this
offset int
return string

ContainsAny() public static method

Contains any of the given needles.
public static ContainsAny ( this haystack ) : bool
haystack this Haystack.
return bool

GetGenderPronoun() public static method

Gets the gender pronoun.
public static GetGenderPronoun ( string gender, string input ) : string
gender string Gender. e.g. 'Male' or 'Female'
input string Input. e.g. '%hisher' or 'she'
return string

SanitizeString() public static method

Sanitizes the string.
public static SanitizeString ( string str, bool punctuation = false ) : string
str string Input to be sanitized.
punctuation bool If set to true, allows for punctuation. Otherwise it is also sanitized.
return string