C# Класс Evbpc.Framework.Utilities.Extensions.StringExtensions

Provides extensions to convert certain objects to certain other objects.
Показать файл Открыть проект

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

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

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

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

public static BuildQueryString ( string>.Dictionary values ) : string
values string>.Dictionary
Результат string

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

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.
Результат byte[]

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

public static GetCharacterType ( this c ) : CharacterType
c this
Результат CharacterType

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

Converts a hexadecimal string to a byte array.
public static HexToByteArray ( this hex ) : byte[]
hex this The hexadecimal string to convert.
Результат byte[]

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

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

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

Converts a string array to a hexadecimal array.
public static StringArrayToHexArray ( this input ) : string[]
input this The array to convert.
Результат string[]

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

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

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

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

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

Converts a byte array to a hexadecimal string.
public static ToHexString ( this input ) : string
input this The byte array to convert.
Результат string

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

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