C# Class Nuve.Orthographic.StringExtensions

Afficher le fichier Open project: hrzafer/nuve

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

DeleteFirstChar() public static méthode

public static DeleteFirstChar ( this str ) : string
str this
Résultat string

DeleteFirstOccurrenceOfAny() public static méthode

public static DeleteFirstOccurrenceOfAny ( this str, string letters ) : string
str this
letters string
Résultat string

DeleteLastChar() public static méthode

public static DeleteLastChar ( this str ) : string
str this
Résultat string

DeleteLastOccurrenceOfAny() public static méthode

public static DeleteLastOccurrenceOfAny ( this str, string letters ) : string
str this
letters string
Résultat string

FirstCharEqualsAny() public static méthode

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
Résultat bool

FirstOccurrenceOfAny() public static méthode

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
Résultat char?

IsEmpty() public static méthode

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

LastCharEqualsAny() public static méthode

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
Résultat bool

LastOccurrenceOfAny() public static méthode

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
Résultat char?

PenultimateOccurrenceOfAny() public static méthode

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
Résultat char?

ReplaceFirstOccurrence() public static méthode

public static ReplaceFirstOccurrence ( this str, string oldPattern, string newPattern ) : string
str this
oldPattern string
newPattern string
Résultat string

ReplaceLastOccurrence() public static méthode

public static ReplaceLastOccurrence ( this str, string oldPattern, string newPattern ) : string
str this
oldPattern string
newPattern string
Résultat string

SubstringJava() public static méthode

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
Résultat string

ThrowIfNull() public static méthode

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

ThrowIfNullAny() public static méthode

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