C# Class Platform.Text.TextConversion

Provides useful methods for converting text.
显示文件 Open project: platformdotnet/Platform

Public Properties

Property Type Description
Base32Alphabet char[]
Base32AlphabetLowercase char[]
HexValues char[]
HexValuesLowercase char[]
SoundexValues char[]

Public Methods

Method Description
FromBase64CharArray ( char array, int offset, int length ) : byte[]
FromBase64String ( string s ) : byte[]
FromEscapedHexString ( string s ) : string

Decodes a string from an escaped hex string (URL encoded).

FromHex ( char c ) : int
FromHexString ( string s ) : byte[]
IsHexChar ( char c ) : bool
IsStandardUrlEscapedChar ( char c ) : bool
IsStandardUrlUnEscapedChar ( char c ) : bool
ToBase32CharArray ( byte input, int offsetIn, int length, char outArray, int offsetOut ) : int
ToBase32String ( byte input ) : string
ToBase32String ( byte input, int offset, int length ) : string
ToBase32String ( int x ) : string
ToBase32String ( long x ) : string
ToBase64CharArray ( byte input, int offsetIn, int length, char outArray, int offsetOut ) : int
ToBase64String ( byte input ) : string
ToBase64String ( byte input, int offset, int length ) : string
ToEscapedHexString ( string s ) : string
ToEscapedHexString ( string s, Predicate shouldEscapeChar ) : string
ToEscapedHexString ( string s, int>.Predicate shouldEscapeChar ) : string
ToEscapedHexString ( string s, string charsToEscape ) : string
ToHexChar ( byte x ) : char
ToHexChar ( int x ) : char
ToHexChar ( int x, bool lowercase ) : char
ToHexChar ( long x ) : char
ToHexChar ( short x ) : char
ToHexString ( byte bytes ) : string
ToHexString ( byte bytes, bool lowercase ) : string
ToHexString ( int value ) : string
ToHexString ( long value ) : string
ToReEscapedHexString ( string s, Predicate shouldEscape ) : string
ToSoundex ( string value ) : string
WriteEscapedHexString ( TextReader reader, TextWriter writer ) : TextWriter
WriteEscapedHexString ( TextReader reader, TextWriter writer, Predicate shouldEscapeChar ) : TextWriter
WriteSoundex ( TextWriter writer, string value ) : void
WriteUnescapedHexString ( StringReader reader, StringWriter writer ) : TextWriter

Private Methods

Method Description
ToHexChar ( int x, char hexValues ) : char
ToHexString ( byte bytes, char hexValues ) : string

Method Details

FromBase64CharArray() public static method

public static FromBase64CharArray ( char array, int offset, int length ) : byte[]
array char
offset int
length int
return byte[]

FromBase64String() public static method

public static FromBase64String ( string s ) : byte[]
s string
return byte[]

FromEscapedHexString() public static method

Decodes a string from an escaped hex string (URL encoded).
public static FromEscapedHexString ( string s ) : string
s string The escaped hex encoded string
return string

FromHex() public static method

public static FromHex ( char c ) : int
c char
return int

FromHexString() public static method

public static FromHexString ( string s ) : byte[]
s string
return byte[]

IsHexChar() public static method

public static IsHexChar ( char c ) : bool
c char
return bool

IsStandardUrlEscapedChar() public static method

public static IsStandardUrlEscapedChar ( char c ) : bool
c char
return bool

IsStandardUrlUnEscapedChar() public static method

public static IsStandardUrlUnEscapedChar ( char c ) : bool
c char
return bool

ToBase32CharArray() public static method

public static ToBase32CharArray ( byte input, int offsetIn, int length, char outArray, int offsetOut ) : int
input byte
offsetIn int
length int
outArray char
offsetOut int
return int

ToBase32String() public static method

public static ToBase32String ( byte input ) : string
input byte
return string

ToBase32String() public static method

public static ToBase32String ( byte input, int offset, int length ) : string
input byte
offset int
length int
return string

ToBase32String() public static method

public static ToBase32String ( int x ) : string
x int
return string

ToBase32String() public static method

public static ToBase32String ( long x ) : string
x long
return string

ToBase64CharArray() public static method

public static ToBase64CharArray ( byte input, int offsetIn, int length, char outArray, int offsetOut ) : int
input byte
offsetIn int
length int
outArray char
offsetOut int
return int

ToBase64String() public static method

public static ToBase64String ( byte input ) : string
input byte
return string

ToBase64String() public static method

public static ToBase64String ( byte input, int offset, int length ) : string
input byte
offset int
length int
return string

ToEscapedHexString() public static method

public static ToEscapedHexString ( string s ) : string
s string
return string

ToEscapedHexString() public static method

public static ToEscapedHexString ( string s, Predicate shouldEscapeChar ) : string
s string
shouldEscapeChar Predicate
return string

ToEscapedHexString() public static method

public static ToEscapedHexString ( string s, int>.Predicate shouldEscapeChar ) : string
s string
shouldEscapeChar int>.Predicate
return string

ToEscapedHexString() public static method

public static ToEscapedHexString ( string s, string charsToEscape ) : string
s string
charsToEscape string
return string

ToHexChar() public static method

public static ToHexChar ( byte x ) : char
x byte
return char

ToHexChar() public static method

public static ToHexChar ( int x ) : char
x int
return char

ToHexChar() public static method

public static ToHexChar ( int x, bool lowercase ) : char
x int
lowercase bool
return char

ToHexChar() public static method

public static ToHexChar ( long x ) : char
x long
return char

ToHexChar() public static method

public static ToHexChar ( short x ) : char
x short
return char

ToHexString() public static method

public static ToHexString ( byte bytes ) : string
bytes byte
return string

ToHexString() public static method

public static ToHexString ( byte bytes, bool lowercase ) : string
bytes byte
lowercase bool
return string

ToHexString() public static method

public static ToHexString ( int value ) : string
value int
return string

ToHexString() public static method

public static ToHexString ( long value ) : string
value long
return string

ToReEscapedHexString() public static method

public static ToReEscapedHexString ( string s, Predicate shouldEscape ) : string
s string
shouldEscape Predicate
return string

ToSoundex() public static method

public static ToSoundex ( string value ) : string
value string
return string

WriteEscapedHexString() public static method

public static WriteEscapedHexString ( TextReader reader, TextWriter writer ) : TextWriter
reader TextReader
writer System.IO.TextWriter
return System.IO.TextWriter

WriteEscapedHexString() public static method

public static WriteEscapedHexString ( TextReader reader, TextWriter writer, Predicate shouldEscapeChar ) : TextWriter
reader TextReader
writer System.IO.TextWriter
shouldEscapeChar Predicate
return System.IO.TextWriter

WriteSoundex() public static method

public static WriteSoundex ( TextWriter writer, string value ) : void
writer System.IO.TextWriter
value string
return void

WriteUnescapedHexString() public static method

public static WriteUnescapedHexString ( StringReader reader, StringWriter writer ) : TextWriter
reader System.IO.StringReader
writer System.IO.StringWriter
return System.IO.TextWriter

Property Details

Base32Alphabet public_oe static_oe property

public static char[] Base32Alphabet
return char[]

Base32AlphabetLowercase public_oe static_oe property

public static char[] Base32AlphabetLowercase
return char[]

HexValues public_oe static_oe property

public static char[] HexValues
return char[]

HexValuesLowercase public_oe static_oe property

public static char[] HexValuesLowercase
return char[]

SoundexValues public_oe static_oe property

public static char[] SoundexValues
return char[]