C# Class Nuve.Orthographic.StringExtensions

Exibir arquivo Open project: hrzafer/nuve

Public Methods

Method Description
ContainsWhitespaceAny ( ) : int

Returns the index of firt string that contains a whitespace

DeleteFirstChar ( this str ) : string
DeleteFirstOccurrenceOfAny ( this str, string letters ) : string

DeleteLastChar ( this str ) : string
DeleteLastOccurrenceOfAny ( this str, string letters ) : string
FirstCharEqualsAny ( this str, string letters ) : bool

Indicates whether the first character of this string is equal to any character in the specified string.

FirstOccurrenceOfAny ( this str, string letters ) : char?

Returns the character in the specified string that occurres first in this string. Returns null if no character in the specified string is found this string.

IsEmpty ( this str ) : bool

Indicates whether this string is empty. Throws an ArgumentNullException if this string is null.

LastCharEqualsAny ( this str, string letters ) : bool

Indicates whether the last character of this string is equal to any character in the specified string.

LastOccurrenceOfAny ( this str, string letters ) : char?

Returns the character in the specified string that occurres last in this string. Returns null if no character in the specified string is found this string.

PenultimateOccurrenceOfAny ( this str, string letters ) : char?

Returns the character in the specified string that occurres next to last in this string. Returns null if no such character is found.

ReplaceFirstOccurrence ( this str, string oldPattern, string newPattern ) : string
ReplaceLastOccurrence ( this str, string oldPattern, string newPattern ) : string
SubstringJava ( this s, int start, int end ) : string

Provides the same functionality with the substring method of Java

ThrowIfNull ( this str ) : void

Throws an ArgumentNullException if this string is null

ThrowIfNullAny ( ) : void

Throws an ArgumentNullException if any of the objects in the specified array is null

Private Methods

Method Description
Normalize ( this s, string>.IDictionary map ) : string

Replaces each key of the map with corresponding value

RemoveParentheses ( this str ) : string

Removes all the '(' and ')' characters in this string.

RomanNumeralToArabic ( this number ) : int

Converts number from Roman form to Arabic form

ThrowIfEmpty ( this str ) : void

Throws an ArgumentException if this string is empty

UppercaseFirst ( this str ) : string

String'in ilk harfini Turkish culture'a göre büyük harf yapar

Method Details

ContainsWhitespaceAny() public static method

Returns the index of firt string that contains a whitespace
public static ContainsWhitespaceAny ( ) : int
return int

DeleteFirstChar() public static method

public static DeleteFirstChar ( this str ) : string
str this
return string

DeleteFirstOccurrenceOfAny() public static method

public static DeleteFirstOccurrenceOfAny ( this str, string letters ) : string
str this
letters string
return string

DeleteLastChar() public static method

public static DeleteLastChar ( this str ) : string
str this
return string

DeleteLastOccurrenceOfAny() public static method

public static DeleteLastOccurrenceOfAny ( this str, string letters ) : string
str this
letters string
return string

FirstCharEqualsAny() public static method

Indicates whether the first character of this string is equal to any character in the specified string.
public static FirstCharEqualsAny ( this str, string letters ) : bool
str this
letters string
return bool

FirstOccurrenceOfAny() public static method

Returns the character in the specified string that occurres first in this string. Returns null if no character in the specified string is found this string.
public static FirstOccurrenceOfAny ( this str, string letters ) : char?
str this
letters string
return char?

IsEmpty() public static method

Indicates whether this string is empty. Throws an ArgumentNullException if this string is null.
public static IsEmpty ( this str ) : bool
str this
return bool

LastCharEqualsAny() public static method

Indicates whether the last character of this string is equal to any character in the specified string.
public static LastCharEqualsAny ( this str, string letters ) : bool
str this
letters string
return bool

LastOccurrenceOfAny() public static method

Returns the character in the specified string that occurres last in this string. Returns null if no character in the specified string is found this string.
public static LastOccurrenceOfAny ( this str, string letters ) : char?
str this
letters string
return char?

PenultimateOccurrenceOfAny() public static method

Returns the character in the specified string that occurres next to last in this string. Returns null if no such character is found.
public static PenultimateOccurrenceOfAny ( this str, string letters ) : char?
str this
letters string
return char?

ReplaceFirstOccurrence() public static method

public static ReplaceFirstOccurrence ( this str, string oldPattern, string newPattern ) : string
str this
oldPattern string
newPattern string
return string

ReplaceLastOccurrence() public static method

public static ReplaceLastOccurrence ( this str, string oldPattern, string newPattern ) : string
str this
oldPattern string
newPattern string
return string

SubstringJava() public static method

Provides the same functionality with the substring method of Java
public static SubstringJava ( this s, int start, int end ) : string
s this
start int
end int
return string

ThrowIfNull() public static method

Throws an ArgumentNullException if this string is null
public static ThrowIfNull ( this str ) : void
str this
return void

ThrowIfNullAny() public static method

Throws an ArgumentNullException if any of the objects in the specified array is null
public static ThrowIfNullAny ( ) : void
return void