C# Класс Signum.Utilities.StringExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
HasText ( this str ) : bool
NotFound ( string str, char separator ) : InvalidOperationException
NotFound ( string str, string separator ) : InvalidOperationException

Описание методов

Add() публичный статический Метод

public static Add ( this str, string separator, string part ) : string
str this
separator string
part string
Результат string

AddLine() публичный статический Метод

public static AddLine ( this str, string part ) : string
str this
part string
Результат string

After() публичный статический Метод

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
Результат string

After() публичный статический Метод

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
Результат string

AfterLast() публичный статический Метод

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
Результат string

AfterLast() публичный статический Метод

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
Результат string

AppendLines() публичный статический Метод

public static AppendLines ( this sb, IEnumerable strings ) : StringBuilder
sb this
strings IEnumerable
Результат StringBuilder

AssertHasText() публичный статический Метод

public static AssertHasText ( this str, string errorMessage ) : string
str this
errorMessage string
Результат string

Before() публичный статический Метод

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
Результат string

Before() публичный статический Метод

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
Результат string

BeforeLast() публичный статический Метод

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
Результат string

BeforeLast() публичный статический Метод

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
Результат string

Between() публичный статический Метод

public static Between ( this str, char firstSeparator, char secondSeparator = (char)0 ) : string
str this
firstSeparator char
secondSeparator char
Результат string

Between() публичный статический Метод

public static Between ( this str, string firstSeparator, string secondSeparator = null ) : string
str this
firstSeparator string
secondSeparator string
Результат string

Combine() публичный статический Метод

public static Combine ( this separator ) : string
separator this
Результат string

CombineIfNotEmpty() публичный статический Метод

public static CombineIfNotEmpty ( this separator ) : string
separator this
Результат string

Contains() публичный статический Метод

public static Contains ( this source, string toCheck, System.StringComparison comp ) : bool
source this
toCheck string
comp System.StringComparison
Результат bool

ContinuesWith() публичный статический Метод

public static ContinuesWith ( this str, string subString, int pos ) : bool
str this
subString string
pos int
Результат bool

CountRepetitions() публичный статический Метод

public static CountRepetitions ( this text, string part ) : int
text this
part string
Результат int

DefaultText() публичный статический Метод

public static DefaultText ( this str, string defaultText ) : string
str this
defaultText string
Результат string

End() публичный статический Метод

public static End ( this str, int numChars ) : string
str this
numChars int
Результат string

Etc() публичный статический Метод

public static Etc ( this str, int max ) : string
str this
max int
Результат string

Etc() публичный статический Метод

public static Etc ( this str, int max, string etcString ) : string
str this
max int
etcString string
Результат string

FirstLower() публичный статический Метод

public static FirstLower ( this str ) : string
str this
Результат string

FirstNonEmptyLine() публичный статический Метод

public static FirstNonEmptyLine ( this str ) : string
str this
Результат string

FirstUpper() публичный статический Метод

public static FirstUpper ( this str ) : string
str this
Результат string

FormatWith() публичный статический Метод

public static FormatWith ( this pattern ) : string
pattern this
Результат string

FormatWith() публичный статический Метод

public static FormatWith ( this format, IFormatProvider provider ) : string
format this
provider IFormatProvider
Результат string

FormatWith() публичный статический Метод

public static FormatWith ( this format, object arg0 ) : string
format this
arg0 object
Результат string

FormatWith() публичный статический Метод

public static FormatWith ( this format, object arg0, object arg1 ) : string
format this
arg0 object
arg1 object
Результат string

FormatWith() публичный статический Метод

public static FormatWith ( this format, object arg0, object arg1, object arg2 ) : string
format this
arg0 object
arg1 object
arg2 object
Результат string

Indent() публичный статический Метод

public static Indent ( this str, int numChars ) : string
str this
numChars int
Результат string

Indent() публичный статический Метод

public static Indent ( this str, int numChars, char indentChar ) : string
str this
numChars int
indentChar char
Результат string

Like() публичный статический Метод

public static Like ( this str, string pattern ) : bool
str this
pattern string
Результат bool

Lines() публичный статический Метод

public static Lines ( this str ) : string[]
str this
Результат string[]

PadChopLeft() публичный статический Метод

public static PadChopLeft ( this str, int length ) : string
str this
length int
Результат string

PadChopRight() публичный статический Метод

public static PadChopRight ( this str, int length ) : string
str this
length int
Результат string

RemoveChars() публичный статический Метод

public static RemoveChars ( this str ) : string
str this
Результат string

RemoveDiacritics() публичный статический Метод

public static RemoveDiacritics ( this s ) : string
s this
Результат string

RemoveEnd() публичный статический Метод

public static RemoveEnd ( this str, int numChars ) : string
str this
numChars int
Результат string

RemoveStart() публичный статический Метод

public static RemoveStart ( this str, int numChars ) : string
str this
numChars int
Результат string

Replace() публичный статический Метод

public static Replace ( this str, char>.Dictionary replacements ) : string
str this
replacements char>.Dictionary
Результат string

Replace() публичный статический Метод

public static Replace ( this str, string>.Dictionary replacements ) : string
str this
replacements string>.Dictionary
Результат string

Replicate() публичный статический Метод

public static Replicate ( this str, int times ) : string
str this
times int
Результат string

Reverse() публичный статический Метод

public static Reverse ( this str ) : string
str this
Результат string

SplitInGroupsOf() публичный статический Метод

public static SplitInGroupsOf ( this str, int maxChars ) : List
str this
maxChars int
Результат List

SplitNoEmpty() публичный статический Метод

public static SplitNoEmpty ( this text ) : string[]
text this
Результат string[]

SplitNoEmpty() публичный статический Метод

public static SplitNoEmpty ( this text, char separator ) : string[]
text this
separator char
Результат string[]

SplitNoEmpty() публичный статический Метод

public static SplitNoEmpty ( this text, string separator ) : string[]
text this
separator string
Результат string[]

Start() публичный статический Метод

public static Start ( this str, int numChars ) : string
str this
numChars int
Результат string

ToComputerSize() публичный статический Метод

public static ToComputerSize ( this value ) : string
value this
Результат string

ToComputerSize() публичный статический Метод

public static ToComputerSize ( this value, bool useAbbreviations ) : string
value this
useAbbreviations bool
Результат string

TryAfter() публичный статический Метод

get the substring after the first occurence of the separator
public static TryAfter ( this str, char separator ) : string
str this
separator char
Результат string

TryAfter() публичный статический Метод

get the substring after the first occurence of the separator
public static TryAfter ( this str, string separator ) : string
str this
separator string
Результат string

TryAfterLast() публичный статический Метод

get the substring after the last occurence of the separator
public static TryAfterLast ( this str, char separator ) : string
str this
separator char
Результат string

TryAfterLast() публичный статический Метод

get the substring after the last occurence of the separator
public static TryAfterLast ( this str, string separator ) : string
str this
separator string
Результат string

TryBefore() публичный статический Метод

get the substring before the first occurence of the separator
public static TryBefore ( this str, char separator ) : string
str this
separator char
Результат string

TryBefore() публичный статический Метод

get the substring before the first occurence of the separator
public static TryBefore ( this str, string separator ) : string
str this
separator string
Результат string

TryBeforeLast() публичный статический Метод

get the substring before the last occurence of the separator
public static TryBeforeLast ( this str, char separator ) : string
str this
separator char
Результат string

TryBeforeLast() публичный статический Метод

get the substring before the last occurence of the separator
public static TryBeforeLast ( this str, string separator ) : string
str this
separator string
Результат string

TryBetween() публичный статический Метод

public static TryBetween ( this str, char firstSeparator, char secondSeparator = (char)0 ) : string
str this
firstSeparator char
secondSeparator char
Результат string

TryBetween() публичный статический Метод

public static TryBetween ( this str, string firstSeparator, string secondSeparator = null ) : string
str this
firstSeparator string
secondSeparator string
Результат string

TryEnd() публичный статический Метод

public static TryEnd ( this str, int numChars ) : string
str this
numChars int
Результат string

TryRemoveEnd() публичный статический Метод

public static TryRemoveEnd ( this str, int numChars ) : string
str this
numChars int
Результат string

TryRemoveStart() публичный статический Метод

public static TryRemoveStart ( this str, int numChars ) : string
str this
numChars int
Результат string

TryStart() публичный статический Метод

public static TryStart ( this str, int numChars ) : string
str this
numChars int
Результат string

VerticalEtc() публичный статический Метод

public static VerticalEtc ( this str, int maxLines, string etcString = "(...)" ) : string
str this
maxLines int
etcString string
Результат string

Wildcards() публичный статический Метод

public static Wildcards ( this fileName, IEnumerable wildcards ) : bool
fileName this
wildcards IEnumerable
Результат bool

Wildcards() публичный статический Метод

public static Wildcards ( this fileName, string wildcard ) : bool
fileName this
wildcard string
Результат bool