C# Class SharpOS.Kernel.Foundation.Convert

Afficher le fichier Open project: sharpos/SharpOS

Méthodes publiques

Méthode 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

Méthode 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 méthode

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
Résultat byte

ToAscii() public static méthode

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 ///
Résultat byte[]

ToAscii() public static méthode

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
Résultat byte[]

ToByteString() public static méthode

public static ToByteString ( string str, byte buffer, int bufferLen, int offset ) : int
str string
buffer byte
bufferLen int
offset int
Résultat int

ToCString8() public static méthode

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
Résultat CString8*

ToCString8() public static méthode

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
Résultat CString8*

ToInt32() public static méthode

public static ToInt32 ( CString8 str ) : int
str CString8
Résultat int

ToInt32() public static méthode

public static ToInt32 ( CString8 str, int offset, int length ) : int
str CString8
offset int
length int
Résultat int

ToInt32() public static méthode

public static ToInt32 ( PString8 str ) : int
str PString8
Résultat int

ToInt32() public static méthode

public static ToInt32 ( PString8 str, int offset, int length ) : int
str PString8
offset int
length int
Résultat int

ToInt32() public static méthode

public static ToInt32 ( byte buffer, int offset, int length, int capacity ) : int
buffer byte
offset int
length int
capacity int
Résultat int

ToString() public static méthode

public static ToString ( int value, bool hex ) : CString8*
value int
hex bool
Résultat CString8*

ToString() public static méthode

public static ToString ( long value, bool hex ) : CString8*
value long
hex bool
Résultat CString8*

ToString() public static méthode

public static ToString ( int value, bool hex, byte buffer, int bufferLen, int offset ) : int
value int
hex bool
buffer byte
bufferLen int
offset int
Résultat int

ToString() public static méthode

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

ToString() public static méthode

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

ToString() static public méthode

static public ToString ( CString8 cstring ) : string
cstring CString8
Résultat string

ToString() static public méthode

static public ToString ( char val ) : string
val char
Résultat string

ToString() static public méthode

static public ToString ( char val, int startIndex, int length ) : string
val char
startIndex int
length int
Résultat string

__Test1() public static méthode

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

__Test2() public static méthode

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

__Test3() public static méthode

public static __Test3 ( ) : void
Résultat void