C# Класс Microsoft.Common.Core.StringExtensions

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

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

Метод Описание
ContainsIgnoreCase ( this s, string prefix ) : bool
EndsWith ( this s, char ch ) : bool
EndsWithIgnoreCase ( this s, string suffix ) : bool
EndsWithOrdinal ( this s, string suffix ) : bool
EqualsIgnoreCase ( this s, string other ) : bool
EqualsOrdinal ( this s, string other ) : bool
FormatCurrent ( this format ) : string
FormatCurrent ( this format, object arg ) : string
FormatInvariant ( this format ) : string
FormatInvariant ( this format, object arg ) : string
GetDefaultLineBreakSequence ( this s ) : string

Given a string (typically text from a file) determines which line break sequence should be used when editing or formatting the file. If no line breaks found, LF is returned.

GetSHA512Hash ( this input ) : string
IndexOfIgnoreCase ( this s, string searchFor ) : int
IndexOfIgnoreCase ( this s, string searchFor, int startIndex ) : int
IndexOfOrdinal ( this s, string searchFor ) : int
LastIndexOfIgnoreCase ( this s, string searchFor ) : int
LastIndexOfIgnoreCase ( this s, string searchFor, int startIndex ) : int
RemoveWhiteSpaceLines ( this text ) : string
Replace ( this s, string oldValue, string newValue, int start, int length ) : string
StartsWithIgnoreCase ( this s, string prefix ) : bool
StartsWithOrdinal ( this s, string prefix ) : bool
SubstringToHex ( this s, int position, int count ) : int
ToDateTimeOrDefault ( this value ) : System.DateTime
ToLongOrDefault ( this value ) : long
TrimQuotes ( this s ) : string

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

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

public static ContainsIgnoreCase ( this s, string prefix ) : bool
s this
prefix string
Результат bool

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

public static EndsWith ( this s, char ch ) : bool
s this
ch char
Результат bool

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

public static EndsWithIgnoreCase ( this s, string suffix ) : bool
s this
suffix string
Результат bool

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

public static EndsWithOrdinal ( this s, string suffix ) : bool
s this
suffix string
Результат bool

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

public static EqualsIgnoreCase ( this s, string other ) : bool
s this
other string
Результат bool

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

public static EqualsOrdinal ( this s, string other ) : bool
s this
other string
Результат bool

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

public static FormatCurrent ( this format ) : string
format this
Результат string

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

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

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

public static FormatInvariant ( this format ) : string
format this
Результат string

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

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

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

Given a string (typically text from a file) determines which line break sequence should be used when editing or formatting the file. If no line breaks found, LF is returned.
public static GetDefaultLineBreakSequence ( this s ) : string
s this
Результат string

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

public static GetSHA512Hash ( this input ) : string
input this
Результат string

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

public static IndexOfIgnoreCase ( this s, string searchFor ) : int
s this
searchFor string
Результат int

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

public static IndexOfIgnoreCase ( this s, string searchFor, int startIndex ) : int
s this
searchFor string
startIndex int
Результат int

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

public static IndexOfOrdinal ( this s, string searchFor ) : int
s this
searchFor string
Результат int

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

public static LastIndexOfIgnoreCase ( this s, string searchFor ) : int
s this
searchFor string
Результат int

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

public static LastIndexOfIgnoreCase ( this s, string searchFor, int startIndex ) : int
s this
searchFor string
startIndex int
Результат int

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

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

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

public static Replace ( this s, string oldValue, string newValue, int start, int length ) : string
s this
oldValue string
newValue string
start int
length int
Результат string

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

public static StartsWithIgnoreCase ( this s, string prefix ) : bool
s this
prefix string
Результат bool

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

public static StartsWithOrdinal ( this s, string prefix ) : bool
s this
prefix string
Результат bool

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

public static SubstringToHex ( this s, int position, int count ) : int
s this
position int
count int
Результат int

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

public static ToDateTimeOrDefault ( this value ) : System.DateTime
value this
Результат System.DateTime

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

public static ToLongOrDefault ( this value ) : long
value this
Результат long

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

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