C# Class Evbpc.Framework.Utilities.Extensions.StringExtensions

Provides extensions to convert certain objects to certain other objects.
Afficher le fichier Open project: EBrown8534/Framework

Méthodes publiques

Méthode Description
BuildQueryString ( string>.Dictionary values ) : string
FromBase64String ( this input, Base64FormattingOptions options = Base64FormattingOptions.RequirePaddingCharacter ) : byte[]

Converts an RFC4648 (https://tools.ietf.org/html/rfc4648) Base64 string to a byte-array.

GetCharacterType ( this c ) : CharacterType
HexToByteArray ( this hex ) : byte[]

Converts a hexadecimal string to a byte array.

InsertOnCharacter ( this source, CharacterType type, string insert ) : string

Inserts a string into another string before each occurrence of the specified CharacterType.

In the case of the first character of source matching the specified CharacterType, the insert will not be inserted.

StringArrayToHexArray ( this input ) : string[]

Converts a string array to a hexadecimal array.

ToBase32String ( this input, Base32FormattingOptions options = Base32FormattingOptions.RequirePaddingCharacter ) : string

Converts a byte-array to an RFC4648 (https://tools.ietf.org/html/rfc4648) Base32 string.

ToBase64String ( this input, Base64FormattingOptions options = Base64FormattingOptions.RequirePaddingCharacter, uint charactersPerLine ) : string

Converts a byte-array to an RFC4648 (https://tools.ietf.org/html/rfc4648) Base64 string.

ToHexString ( this input ) : string

Converts a byte array to a hexadecimal string.

ToPascalCase ( this s ) : string

Converts a string of dash-separated, or underscore-separated words to a PascalCase string.

Method Details

BuildQueryString() public static méthode

public static BuildQueryString ( string>.Dictionary values ) : string
values string>.Dictionary
Résultat string

FromBase64String() public static méthode

Converts an RFC4648 (https://tools.ietf.org/html/rfc4648) Base64 string to a byte-array.
public static FromBase64String ( this input, Base64FormattingOptions options = Base64FormattingOptions.RequirePaddingCharacter ) : byte[]
input this The input string.
options Base64FormattingOptions Any of enumeration values.
Résultat byte[]

GetCharacterType() public static méthode

public static GetCharacterType ( this c ) : CharacterType
c this
Résultat CharacterType

HexToByteArray() public static méthode

Converts a hexadecimal string to a byte array.
public static HexToByteArray ( this hex ) : byte[]
hex this The hexadecimal string to convert.
Résultat byte[]

InsertOnCharacter() public static méthode

Inserts a string into another string before each occurrence of the specified CharacterType.
In the case of the first character of source matching the specified CharacterType, the insert will not be inserted.
public static InsertOnCharacter ( this source, CharacterType type, string insert ) : string
source this The string to insert into.
type CharacterType The to insert before.
insert string The string to insert.
Résultat string

StringArrayToHexArray() public static méthode

Converts a string array to a hexadecimal array.
public static StringArrayToHexArray ( this input ) : string[]
input this The array to convert.
Résultat string[]

ToBase32String() public static méthode

Converts a byte-array to an RFC4648 (https://tools.ietf.org/html/rfc4648) Base32 string.
public static ToBase32String ( this input, Base32FormattingOptions options = Base32FormattingOptions.RequirePaddingCharacter ) : string
input this The input byte-array.
options Base32FormattingOptions Any of enumeration values.
Résultat string

ToBase64String() public static méthode

Converts a byte-array to an RFC4648 (https://tools.ietf.org/html/rfc4648) Base64 string.
public static ToBase64String ( this input, Base64FormattingOptions options = Base64FormattingOptions.RequirePaddingCharacter, uint charactersPerLine ) : string
input this The input byte-array.
options Base64FormattingOptions Any of enumeration values.
charactersPerLine uint If this is a non-zero uinteger, than the number of characters per line will be equivalent to this value.
Résultat string

ToHexString() public static méthode

Converts a byte array to a hexadecimal string.
public static ToHexString ( this input ) : string
input this The byte array to convert.
Résultat string

ToPascalCase() public static méthode

Converts a string of dash-separated, or underscore-separated words to a PascalCase string.
public static ToPascalCase ( this s ) : string
s this The string to convert.
Résultat string