C# Class SharpOS.Kernel.Foundation.Convert

Exibir arquivo Open project: sharpos/SharpOS

Public Methods

Method Description
ToAscii ( char value ) : byte

Converts character to ascii representation. If unicode character is outside the range of an Ascii character then Convert.NonAsciiCharacter is returned.

ToAscii ( char value ) : byte[]

Converts the array of characters to ascii representation. If unicode character is outside the range of an Ascii character then Convert.NonAsciiCharacter is returned in its place.

ToAscii ( string value ) : byte[]

Converts string to its ascii representation. If unicode character is outside the range of an Ascii character then Convert.NonAsciiCharacter is returned in its place.

ToByteString ( string str, byte buffer, int bufferLen, int offset ) : int
ToCString8 ( char value ) : CString8*

Converts character to an ascii c like string representation. If unicode character is outside the range of an Ascii character then Convert.NonAsciiCharacter is returned.

ToCString8 ( string value ) : CString8*

Converts string to its ascii representation terminating with null. If unicode character is outside the range of an Ascii character then Convert.NonAsciiCharacter is returned in its place.

ToInt32 ( CString8 str ) : int
ToInt32 ( CString8 str, int offset, int length ) : int
ToInt32 ( PString8 str ) : int
ToInt32 ( PString8 str, int offset, int length ) : int
ToInt32 ( byte buffer, int offset, int length, int capacity ) : int
ToString ( int value, bool hex ) : CString8*
ToString ( long value, bool hex ) : CString8*
ToString ( int value, bool hex, byte buffer, int bufferLen, int offset ) : int
ToString ( long value, bool hex, byte buffer, int bufferLen, int offset ) : int
ToString ( uint value, bool hex, byte buffer, int bufferLen, int offset ) : int
ToString ( CString8 cstring ) : string
ToString ( char val ) : string
ToString ( char val, int startIndex, int length ) : string
__Test1 ( ) : void

Runs tests on the int to string conversions.

__Test2 ( ) : void

Runs tests on the long to string conversions.

__Test3 ( ) : void

Private Methods

Method Description
ToString ( int value, bool hex, bool signed, byte buffer, int bufferLen, int offset ) : int
__RunTests ( ) : void
__StringComp ( CString8 str1, CString8 str2 ) : bool

Method Details

ToAscii() public static method

Converts character to ascii representation. If unicode character is outside the range of an Ascii character then Convert.NonAsciiCharacter is returned.
public static ToAscii ( char value ) : byte
value char Character to be converted
return byte

ToAscii() public static method

Converts the array of characters to ascii representation. If unicode character is outside the range of an Ascii character then Convert.NonAsciiCharacter is returned in its place.
public static ToAscii ( char value ) : byte[]
value char Array of Characters to Converted ///
return byte[]

ToAscii() public static method

Converts string to its ascii representation. If unicode character is outside the range of an Ascii character then Convert.NonAsciiCharacter is returned in its place.
public static ToAscii ( string value ) : byte[]
value string string to be converted
return byte[]

ToByteString() public static method

public static ToByteString ( string str, byte buffer, int bufferLen, int offset ) : int
str string
buffer byte
bufferLen int
offset int
return int

ToCString8() public static method

Converts character to an ascii c like string representation. If unicode character is outside the range of an Ascii character then Convert.NonAsciiCharacter is returned.
public static ToCString8 ( char value ) : CString8*
value char char to be converted
return CString8*

ToCString8() public static method

Converts string to its ascii representation terminating with null. If unicode character is outside the range of an Ascii character then Convert.NonAsciiCharacter is returned in its place.
public static ToCString8 ( string value ) : CString8*
value string
return CString8*

ToInt32() public static method

public static ToInt32 ( CString8 str ) : int
str CString8
return int

ToInt32() public static method

public static ToInt32 ( CString8 str, int offset, int length ) : int
str CString8
offset int
length int
return int

ToInt32() public static method

public static ToInt32 ( PString8 str ) : int
str PString8
return int

ToInt32() public static method

public static ToInt32 ( PString8 str, int offset, int length ) : int
str PString8
offset int
length int
return int

ToInt32() public static method

public static ToInt32 ( byte buffer, int offset, int length, int capacity ) : int
buffer byte
offset int
length int
capacity int
return int

ToString() public static method

public static ToString ( int value, bool hex ) : CString8*
value int
hex bool
return CString8*

ToString() public static method

public static ToString ( long value, bool hex ) : CString8*
value long
hex bool
return CString8*

ToString() public static method

public static ToString ( int value, bool hex, byte buffer, int bufferLen, int offset ) : int
value int
hex bool
buffer byte
bufferLen int
offset int
return int

ToString() public static method

public static ToString ( long value, bool hex, byte buffer, int bufferLen, int offset ) : int
value long
hex bool
buffer byte
bufferLen int
offset int
return int

ToString() public static method

public static ToString ( uint value, bool hex, byte buffer, int bufferLen, int offset ) : int
value uint
hex bool
buffer byte
bufferLen int
offset int
return int

ToString() static public method

static public ToString ( CString8 cstring ) : string
cstring CString8
return string

ToString() static public method

static public ToString ( char val ) : string
val char
return string

ToString() static public method

static public ToString ( char val, int startIndex, int length ) : string
val char
startIndex int
length int
return string

__Test1() public static method

Runs tests on the int to string conversions.
public static __Test1 ( ) : void
return void

__Test2() public static method

Runs tests on the long to string conversions.
public static __Test2 ( ) : void
return void

__Test3() public static method

public static __Test3 ( ) : void
return void