C# 클래스 org.GraphDefined.Vanaheimr.Illias.StringExtensions

Extensions to the String class.
파일 보기 프로젝트 열기: Vanaheimr/Illias

공개 메소드들

메소드 설명
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