C# Класс org.GraphDefined.Vanaheimr.Illias.StringExtensions

Extensions to the String class.
Показать файл Открыть проект

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

Метод Описание
AggregateIndentedLines ( this Text ) : IEnumerable

Converts the given enumeration of strings into an enumeration of key-value-pairs.

DoubleSplit ( this Text, Char FirstSeparator, Char SecondSeparator ) : String>.Dictionary
DoubleSplitInto ( this Text, Char FirstSeparator, Char SecondSeparator, String>.Dictionary Dictionary ) : String>.Dictionary
EscapeForXMLandHTML ( this myString ) : String
FailIfNotNullOrEmpty ( this GivenString, String ExceptionMessage = null, [ ParameterName = "" ) : void

Throws an ArgumentNullException whenever the given string is not null or empty.

FailIfNullOrEmpty ( this GivenString, String ExceptionMessage = null, [ ParameterName = "" ) : void

Throws an ArgumentNullException whenever the given string is null or empty.

FromBase64 ( this myBase64String ) : String
IfNotNullOrEmpty ( this GivenString, String>.Func Mapper ) : String

Mappes the given string if it is not null or empty.

IsNotNullAndContains ( this String, String Substring ) : System.Boolean

Returns a value indicating whether the specified Substring occurs within the given string.

IsNotNullOrEmpty ( this GivenString ) : System.Boolean

Indicates whether the given string is not null or empty.

IsNotNullOrEmpty ( this GivenString, Action Delegate, [ ParameterName = "" ) : void

Call the given delegate whether the specified string is not null or empty.

IsNullOrEmpty ( this GivenString ) : System.Boolean

Indicates whether the given string is null or empty.

IsNullOrEmpty ( this GivenString, Action Delegate, [ ParameterName = "" ) : void

Call the given delegate whether the specified string is null or empty.

LastIndexOfOrMax ( this Text, String Pattern ) : Int32
RemoveAllAfter ( this String, String Substring ) : String

Removes everything from the string after the given substring.

RemoveAllBefore ( this String, String Substring ) : String

Removes everything from the string before the given substring.

RemoveLastSlash ( this Text ) : String
RemoveQuotes ( this String ) : String

Removes leading and/or tailing (double) quotes.

ReplacePrefix ( this Text, String Prefix, String Replacement ) : String
Reverse ( this String ) : String

Reverse the given string.

SubTokens ( this Text, UInt16 Length ) : IEnumerable
SubstringMax ( this Text, Int32 Length ) : String

Return a substring of the given maximum length.

ToBase64 ( this myString ) : String
ToKeyValuePairs ( this Text ) : String>>.IEnumerable

Converts the given enumeration of strings into an enumeration of key-value-pairs.

ToUTF8Bytes ( this Text ) : Byte[]
ToUTF8String ( this ArrayOfBytes, Int32 NumberOfBytes = -1, System.Boolean ThrowException = true ) : String

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

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

Converts the given enumeration of strings into an enumeration of key-value-pairs.
public static AggregateIndentedLines ( this Text ) : IEnumerable
Text this An enumeration of strings.
Результат IEnumerable

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

public static DoubleSplit ( this Text, Char FirstSeparator, Char SecondSeparator ) : String>.Dictionary
Text this
FirstSeparator Char
SecondSeparator Char
Результат String>.Dictionary

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

public static DoubleSplitInto ( this Text, Char FirstSeparator, Char SecondSeparator, String>.Dictionary Dictionary ) : String>.Dictionary
Text this
FirstSeparator Char
SecondSeparator Char
Dictionary String>.Dictionary
Результат String>.Dictionary

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

public static EscapeForXMLandHTML ( this myString ) : String
myString this
Результат String

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

Throws an ArgumentNullException whenever the given string is not null or empty.
public static FailIfNotNullOrEmpty ( this GivenString, String ExceptionMessage = null, [ ParameterName = "" ) : void
GivenString this The string.
ExceptionMessage String An optional message to be added to the exception.
ParameterName [ The parameter name of the given string (CallerMemberName).
Результат void

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

Throws an ArgumentNullException whenever the given string is null or empty.
public static FailIfNullOrEmpty ( this GivenString, String ExceptionMessage = null, [ ParameterName = "" ) : void
GivenString this The string.
ExceptionMessage String An optional message to be added to the exception.
ParameterName [ The parameter name of the given string (CallerMemberName).
Результат void

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

public static FromBase64 ( this myBase64String ) : String
myBase64String this
Результат String

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

Mappes the given string if it is not null or empty.
public static IfNotNullOrEmpty ( this GivenString, String>.Func Mapper ) : String
GivenString this The string.
Mapper String>.Func A string mapper delegate.
Результат String

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

Returns a value indicating whether the specified Substring occurs within the given string.
public static IsNotNullAndContains ( this String, String Substring ) : System.Boolean
String this A string.
Substring String A substring to search for.
Результат System.Boolean

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

Indicates whether the given string is not null or empty.
public static IsNotNullOrEmpty ( this GivenString ) : System.Boolean
GivenString this The string.
Результат System.Boolean

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

Call the given delegate whether the specified string is not null or empty.
public static IsNotNullOrEmpty ( this GivenString, Action Delegate, [ ParameterName = "" ) : void
GivenString this The string.
Delegate Action A delegate to call whenever the given string is null or empty.
ParameterName [ The parameter name of the given string (CallerMemberName).
Результат void

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

Indicates whether the given string is null or empty.
public static IsNullOrEmpty ( this GivenString ) : System.Boolean
GivenString this The string.
Результат System.Boolean

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

Call the given delegate whether the specified string is null or empty.
public static IsNullOrEmpty ( this GivenString, Action Delegate, [ ParameterName = "" ) : void
GivenString this The string.
Delegate Action A delegate to call whenever the given string is null or empty.
ParameterName [ The parameter name of the given string (CallerMemberName).
Результат void

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

public static LastIndexOfOrMax ( this Text, String Pattern ) : Int32
Text this
Pattern String
Результат System.Int32

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

Removes everything from the string after the given substring.
public static RemoveAllAfter ( this String, String Substring ) : String
String this A string.
Substring String A substring.
Результат String

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

Removes everything from the string before the given substring.
public static RemoveAllBefore ( this String, String Substring ) : String
String this A string.
Substring String A substring.
Результат String

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

public static RemoveLastSlash ( this Text ) : String
Text this
Результат String

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

Removes leading and/or tailing (double) quotes.
public static RemoveQuotes ( this String ) : String
String this The string to check.
Результат String

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

public static ReplacePrefix ( this Text, String Prefix, String Replacement ) : String
Text this
Prefix String
Replacement String
Результат String

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

Reverse the given string.
public static Reverse ( this String ) : String
String this The string to reverse.
Результат String

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

public static SubTokens ( this Text, UInt16 Length ) : IEnumerable
Text this
Length System.UInt16
Результат IEnumerable

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

Return a substring of the given maximum length.
public static SubstringMax ( this Text, Int32 Length ) : String
Text this A text.
Length System.Int32 The maximum length of the substring.
Результат String

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

public static ToBase64 ( this myString ) : String
myString this
Результат String

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

Converts the given enumeration of strings into an enumeration of key-value-pairs.
public static ToKeyValuePairs ( this Text ) : String>>.IEnumerable
Text this An enumeration of strings.
Результат String>>.IEnumerable

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

public static ToUTF8Bytes ( this Text ) : Byte[]
Text this
Результат Byte[]

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

public static ToUTF8String ( this ArrayOfBytes, Int32 NumberOfBytes = -1, System.Boolean ThrowException = true ) : String
ArrayOfBytes this
NumberOfBytes System.Int32
ThrowException System.Boolean
Результат String