C# Class Signum.Utilities.StringExtensions

Afficher le fichier Open project: signumsoftware/framework

Méthodes publiques

Méthode Description
Add ( this str, string separator, string part ) : string
AddLine ( this str, string part ) : string
After ( this str, char separator ) : string

get the substring after the first occurence of the separator

After ( this str, string separator ) : string

get the substring after the first occurence of the separator

AfterLast ( this str, char separator ) : string

get the substring after the last occurence of the separator

AfterLast ( this str, string separator ) : string

get the substring after the last occurence of the separator

AppendLines ( this sb, IEnumerable strings ) : StringBuilder
AssertHasText ( this str, string errorMessage ) : string
Before ( this str, char separator ) : string

get the substring before the first occurence of the separator

Before ( this str, string separator ) : string

get the substring before the first occurence of the separator

BeforeLast ( this str, char separator ) : string

get the substring before the last occurence of the separator

BeforeLast ( this str, string separator ) : string

get the substring before the last occurence of the separator

Between ( this str, char firstSeparator, char secondSeparator = (char)0 ) : string
Between ( this str, string firstSeparator, string secondSeparator = null ) : string
Combine ( this separator ) : string
CombineIfNotEmpty ( this separator ) : string
Contains ( this source, string toCheck, System.StringComparison comp ) : bool
ContinuesWith ( this str, string subString, int pos ) : bool
CountRepetitions ( this text, string part ) : int
DefaultText ( this str, string defaultText ) : string
End ( this str, int numChars ) : string
Etc ( this str, int max ) : string
Etc ( this str, int max, string etcString ) : string
FirstLower ( this str ) : string
FirstNonEmptyLine ( this str ) : string
FirstUpper ( this str ) : string
FormatWith ( this pattern ) : string
FormatWith ( this format, IFormatProvider provider ) : string
FormatWith ( this format, object arg0 ) : string
FormatWith ( this format, object arg0, object arg1 ) : string
FormatWith ( this format, object arg0, object arg1, object arg2 ) : string
Indent ( this str, int numChars ) : string
Indent ( this str, int numChars, char indentChar ) : string
Like ( this str, string pattern ) : bool
Lines ( this str ) : string[]
PadChopLeft ( this str, int length ) : string
PadChopRight ( this str, int length ) : string
RemoveChars ( this str ) : string
RemoveDiacritics ( this s ) : string
RemoveEnd ( this str, int numChars ) : string
RemoveStart ( this str, int numChars ) : string
Replace ( this str, char>.Dictionary replacements ) : string
Replace ( this str, string>.Dictionary replacements ) : string
Replicate ( this str, int times ) : string
Reverse ( this str ) : string
SplitInGroupsOf ( this str, int maxChars ) : List
SplitNoEmpty ( this text ) : string[]
SplitNoEmpty ( this text, char separator ) : string[]
SplitNoEmpty ( this text, string separator ) : string[]
Start ( this str, int numChars ) : string
ToComputerSize ( this value ) : string
ToComputerSize ( this value, bool useAbbreviations ) : string
TryAfter ( this str, char separator ) : string

get the substring after the first occurence of the separator

TryAfter ( this str, string separator ) : string

get the substring after the first occurence of the separator

TryAfterLast ( this str, char separator ) : string

get the substring after the last occurence of the separator

TryAfterLast ( this str, string separator ) : string

get the substring after the last occurence of the separator

TryBefore ( this str, char separator ) : string

get the substring before the first occurence of the separator

TryBefore ( this str, string separator ) : string

get the substring before the first occurence of the separator

TryBeforeLast ( this str, char separator ) : string

get the substring before the last occurence of the separator

TryBeforeLast ( this str, string separator ) : string

get the substring before the last occurence of the separator

TryBetween ( this str, char firstSeparator, char secondSeparator = (char)0 ) : string
TryBetween ( this str, string firstSeparator, string secondSeparator = null ) : string
TryEnd ( this str, int numChars ) : string
TryRemoveEnd ( this str, int numChars ) : string
TryRemoveStart ( this str, int numChars ) : string
TryStart ( this str, int numChars ) : string
VerticalEtc ( this str, int maxLines, string etcString = "(...)" ) : string
Wildcards ( this fileName, IEnumerable wildcards ) : bool
Wildcards ( this fileName, string wildcard ) : bool

Private Methods

Méthode Description
HasText ( this str ) : bool
NotFound ( string str, char separator ) : InvalidOperationException
NotFound ( string str, string separator ) : InvalidOperationException

Method Details

Add() public static méthode

public static Add ( this str, string separator, string part ) : string
str this
separator string
part string
Résultat string

AddLine() public static méthode

public static AddLine ( this str, string part ) : string
str this
part string
Résultat string

After() public static méthode

get the substring after the first occurence of the separator
If the separator is not found in the string
public static After ( this str, char separator ) : string
str this
separator char
Résultat string

After() public static méthode

get the substring after the first occurence of the separator
If the separator is not found in the string
public static After ( this str, string separator ) : string
str this
separator string
Résultat string

AfterLast() public static méthode

get the substring after the last occurence of the separator
If the separator is not found in the string
public static AfterLast ( this str, char separator ) : string
str this
separator char
Résultat string

AfterLast() public static méthode

get the substring after the last occurence of the separator
If the separator is not found in the string
public static AfterLast ( this str, string separator ) : string
str this
separator string
Résultat string

AppendLines() public static méthode

public static AppendLines ( this sb, IEnumerable strings ) : StringBuilder
sb this
strings IEnumerable
Résultat StringBuilder

AssertHasText() public static méthode

public static AssertHasText ( this str, string errorMessage ) : string
str this
errorMessage string
Résultat string

Before() public static méthode

get the substring before the first occurence of the separator
If the separator is not found in the string
public static Before ( this str, char separator ) : string
str this
separator char
Résultat string

Before() public static méthode

get the substring before the first occurence of the separator
If the separator is not found in the string
public static Before ( this str, string separator ) : string
str this
separator string
Résultat string

BeforeLast() public static méthode

get the substring before the last occurence of the separator
If the separator is not found in the string
public static BeforeLast ( this str, char separator ) : string
str this
separator char
Résultat string

BeforeLast() public static méthode

get the substring before the last occurence of the separator
If the separator is not found in the string
public static BeforeLast ( this str, string separator ) : string
str this
separator string
Résultat string

Between() public static méthode

public static Between ( this str, char firstSeparator, char secondSeparator = (char)0 ) : string
str this
firstSeparator char
secondSeparator char
Résultat string

Between() public static méthode

public static Between ( this str, string firstSeparator, string secondSeparator = null ) : string
str this
firstSeparator string
secondSeparator string
Résultat string

Combine() public static méthode

public static Combine ( this separator ) : string
separator this
Résultat string

CombineIfNotEmpty() public static méthode

public static CombineIfNotEmpty ( this separator ) : string
separator this
Résultat string

Contains() public static méthode

public static Contains ( this source, string toCheck, System.StringComparison comp ) : bool
source this
toCheck string
comp System.StringComparison
Résultat bool

ContinuesWith() public static méthode

public static ContinuesWith ( this str, string subString, int pos ) : bool
str this
subString string
pos int
Résultat bool

CountRepetitions() public static méthode

public static CountRepetitions ( this text, string part ) : int
text this
part string
Résultat int

DefaultText() public static méthode

public static DefaultText ( this str, string defaultText ) : string
str this
defaultText string
Résultat string

End() public static méthode

public static End ( this str, int numChars ) : string
str this
numChars int
Résultat string

Etc() public static méthode

public static Etc ( this str, int max ) : string
str this
max int
Résultat string

Etc() public static méthode

public static Etc ( this str, int max, string etcString ) : string
str this
max int
etcString string
Résultat string

FirstLower() public static méthode

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

FirstNonEmptyLine() public static méthode

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

FirstUpper() public static méthode

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

FormatWith() public static méthode

public static FormatWith ( this pattern ) : string
pattern this
Résultat string

FormatWith() public static méthode

public static FormatWith ( this format, IFormatProvider provider ) : string
format this
provider IFormatProvider
Résultat string

FormatWith() public static méthode

public static FormatWith ( this format, object arg0 ) : string
format this
arg0 object
Résultat string

FormatWith() public static méthode

public static FormatWith ( this format, object arg0, object arg1 ) : string
format this
arg0 object
arg1 object
Résultat string

FormatWith() public static méthode

public static FormatWith ( this format, object arg0, object arg1, object arg2 ) : string
format this
arg0 object
arg1 object
arg2 object
Résultat string

Indent() public static méthode

public static Indent ( this str, int numChars ) : string
str this
numChars int
Résultat string

Indent() public static méthode

public static Indent ( this str, int numChars, char indentChar ) : string
str this
numChars int
indentChar char
Résultat string

Like() public static méthode

public static Like ( this str, string pattern ) : bool
str this
pattern string
Résultat bool

Lines() public static méthode

public static Lines ( this str ) : string[]
str this
Résultat string[]

PadChopLeft() public static méthode

public static PadChopLeft ( this str, int length ) : string
str this
length int
Résultat string

PadChopRight() public static méthode

public static PadChopRight ( this str, int length ) : string
str this
length int
Résultat string

RemoveChars() public static méthode

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

RemoveDiacritics() public static méthode

public static RemoveDiacritics ( this s ) : string
s this
Résultat string

RemoveEnd() public static méthode

public static RemoveEnd ( this str, int numChars ) : string
str this
numChars int
Résultat string

RemoveStart() public static méthode

public static RemoveStart ( this str, int numChars ) : string
str this
numChars int
Résultat string

Replace() public static méthode

public static Replace ( this str, char>.Dictionary replacements ) : string
str this
replacements char>.Dictionary
Résultat string

Replace() public static méthode

public static Replace ( this str, string>.Dictionary replacements ) : string
str this
replacements string>.Dictionary
Résultat string

Replicate() public static méthode

public static Replicate ( this str, int times ) : string
str this
times int
Résultat string

Reverse() public static méthode

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

SplitInGroupsOf() public static méthode

public static SplitInGroupsOf ( this str, int maxChars ) : List
str this
maxChars int
Résultat List

SplitNoEmpty() public static méthode

public static SplitNoEmpty ( this text ) : string[]
text this
Résultat string[]

SplitNoEmpty() public static méthode

public static SplitNoEmpty ( this text, char separator ) : string[]
text this
separator char
Résultat string[]

SplitNoEmpty() public static méthode

public static SplitNoEmpty ( this text, string separator ) : string[]
text this
separator string
Résultat string[]

Start() public static méthode

public static Start ( this str, int numChars ) : string
str this
numChars int
Résultat string

ToComputerSize() public static méthode

public static ToComputerSize ( this value ) : string
value this
Résultat string

ToComputerSize() public static méthode

public static ToComputerSize ( this value, bool useAbbreviations ) : string
value this
useAbbreviations bool
Résultat string

TryAfter() public static méthode

get the substring after the first occurence of the separator
public static TryAfter ( this str, char separator ) : string
str this
separator char
Résultat string

TryAfter() public static méthode

get the substring after the first occurence of the separator
public static TryAfter ( this str, string separator ) : string
str this
separator string
Résultat string

TryAfterLast() public static méthode

get the substring after the last occurence of the separator
public static TryAfterLast ( this str, char separator ) : string
str this
separator char
Résultat string

TryAfterLast() public static méthode

get the substring after the last occurence of the separator
public static TryAfterLast ( this str, string separator ) : string
str this
separator string
Résultat string

TryBefore() public static méthode

get the substring before the first occurence of the separator
public static TryBefore ( this str, char separator ) : string
str this
separator char
Résultat string

TryBefore() public static méthode

get the substring before the first occurence of the separator
public static TryBefore ( this str, string separator ) : string
str this
separator string
Résultat string

TryBeforeLast() public static méthode

get the substring before the last occurence of the separator
public static TryBeforeLast ( this str, char separator ) : string
str this
separator char
Résultat string

TryBeforeLast() public static méthode

get the substring before the last occurence of the separator
public static TryBeforeLast ( this str, string separator ) : string
str this
separator string
Résultat string

TryBetween() public static méthode

public static TryBetween ( this str, char firstSeparator, char secondSeparator = (char)0 ) : string
str this
firstSeparator char
secondSeparator char
Résultat string

TryBetween() public static méthode

public static TryBetween ( this str, string firstSeparator, string secondSeparator = null ) : string
str this
firstSeparator string
secondSeparator string
Résultat string

TryEnd() public static méthode

public static TryEnd ( this str, int numChars ) : string
str this
numChars int
Résultat string

TryRemoveEnd() public static méthode

public static TryRemoveEnd ( this str, int numChars ) : string
str this
numChars int
Résultat string

TryRemoveStart() public static méthode

public static TryRemoveStart ( this str, int numChars ) : string
str this
numChars int
Résultat string

TryStart() public static méthode

public static TryStart ( this str, int numChars ) : string
str this
numChars int
Résultat string

VerticalEtc() public static méthode

public static VerticalEtc ( this str, int maxLines, string etcString = "(...)" ) : string
str this
maxLines int
etcString string
Résultat string

Wildcards() public static méthode

public static Wildcards ( this fileName, IEnumerable wildcards ) : bool
fileName this
wildcards IEnumerable
Résultat bool

Wildcards() public static méthode

public static Wildcards ( this fileName, string wildcard ) : bool
fileName this
wildcard string
Résultat bool