C# Class SharpOS.Kernel.Foundation.PString8

Represents a length-prefixed C-style string (null-terminated). This type can be used as a string buffer,
显示文件 Open project: sharpos/SharpOS Class Usage Examples

Public Methods

Method Description
Clear ( ) : void
Compare ( CString8 str ) : int

Compares the string against str.

Compare ( CString8 str, int count ) : int

Compares count characters of the string against str.

Compare ( PString8 str ) : int

Compares the string against str.

Compare ( PString8 str, int count ) : int

Compares count characters of the string against str.

Compare ( byte str, int count ) : int

Compares count characters of the string against str.

Compare ( string str ) : int

Compares the string against str.

Compare ( string str, int count ) : int

Compares count characters of the string against str.

Concat ( byte character ) : bool

Concatenates character

Concat ( CString8 str ) : int

Concatenates str.

Concat ( CString8 str, int offset, int len ) : int

Concatenates from str the characters at indices offset to offset + len.

Concat ( PString8 str ) : int

Concatenates str.

Concat ( PString8 str, int offset, int len ) : int

Concatenates from str the characters at indices offset to offset + len.

Concat ( byte str ) : int
Concat ( byte str, int len ) : int
Concat ( int number ) : int
Concat ( int number, bool hex ) : int
Concat ( string str ) : int

Concatenates str.

Concat ( string str, int offset, int len ) : int

Concatenates from str the characters at indices offset to offset + len.

ConcatLine ( ) : void

GetChar ( int index ) : byte
GetChar ( int index, bool boundsCheck ) : byte

If boundsCheck is true, makes sure index is in bounds, then gets the character index from the string.

SetChar ( int index, byte value ) : void
SetChar ( int index, byte value, bool boundsCheck ) : void
Wrap ( void buffer, int bufferSize ) : PString8*

Wraps a data buffer into a PString8 pointer and initializes the Capacity field to bufferSize minus the size of the PString8 structure. bufferSize should be the entire size of the allocation.

__Test1 ( ) : void

Private Methods

Method Description
Concat ( byte str, int strLen, int offset, int len ) : int

Internal common implementation of Concat(). The strLen parameter is the length of the string in buffer str, determined using the fastest possible method for the string type. This causes slightly faster performance for string types that store the length of the string (as opposed to null termination).

__RunTests ( ) : void

Method Details

Clear() public method

public Clear ( ) : void
return void

Compare() public method

Compares the string against str.
public Compare ( CString8 str ) : int
str CString8
return int

Compare() public method

Compares count characters of the string against str.
public Compare ( CString8 str, int count ) : int
str CString8
count int
return int

Compare() public method

Compares the string against str.
public Compare ( PString8 str ) : int
str PString8
return int

Compare() public method

Compares count characters of the string against str.
public Compare ( PString8 str, int count ) : int
str PString8
count int
return int

Compare() public method

Compares count characters of the string against str.
public Compare ( byte str, int count ) : int
str byte
count int
return int

Compare() public method

Compares the string against str.
public Compare ( string str ) : int
str string
return int

Compare() public method

Compares count characters of the string against str.
public Compare ( string str, int count ) : int
str string
count int
return int

Concat() public method

Concatenates character
public Concat ( byte character ) : bool
character byte
return bool

Concat() public method

Concatenates str.
public Concat ( CString8 str ) : int
str CString8
return int

Concat() public method

Concatenates from str the characters at indices offset to offset + len.
public Concat ( CString8 str, int offset, int len ) : int
str CString8
offset int
len int
return int

Concat() public method

Concatenates str.
public Concat ( PString8 str ) : int
str PString8
return int

Concat() public method

Concatenates from str the characters at indices offset to offset + len.
public Concat ( PString8 str, int offset, int len ) : int
str PString8
offset int
len int
return int

Concat() public method

public Concat ( byte str ) : int
str byte
return int

Concat() public method

public Concat ( byte str, int len ) : int
str byte
len int
return int

Concat() public method

public Concat ( int number ) : int
number int
return int

Concat() public method

public Concat ( int number, bool hex ) : int
number int
hex bool
return int

Concat() public method

Concatenates str.
public Concat ( string str ) : int
str string
return int

Concat() public method

Concatenates from str the characters at indices offset to offset + len.
public Concat ( string str, int offset, int len ) : int
str string
offset int
len int
return int

ConcatLine() public method

public ConcatLine ( ) : void
return void

GetChar() public method

public GetChar ( int index ) : byte
index int
return byte

GetChar() public method

If boundsCheck is true, makes sure index is in bounds, then gets the character index from the string.
public GetChar ( int index, bool boundsCheck ) : byte
index int
boundsCheck bool
return byte

SetChar() public method

public SetChar ( int index, byte value ) : void
index int
value byte
return void

SetChar() public method

public SetChar ( int index, byte value, bool boundsCheck ) : void
index int
value byte
boundsCheck bool
return void

Wrap() public static method

Wraps a data buffer into a PString8 pointer and initializes the Capacity field to bufferSize minus the size of the PString8 structure. bufferSize should be the entire size of the allocation.
public static Wrap ( void buffer, int bufferSize ) : PString8*
buffer void
bufferSize int
return PString8*

__Test1() public static method

public static __Test1 ( ) : void
return void