Character
Char_IsNum
inline bool Char_IsNum(
c8 chr
)

Check if a given character is numeric (0-9)

Parameters
chr
c8

The character to check

Return

FALSE if the given character is not a numeric.

Char_IsAlpha
inline bool Char_IsAlpha(
c8 chr
)

Check if a given character is alphabetic (A-Za-z)

Parameters
chr
c8

The character to check

Return

FALSE if the given character is not a alphabetic.

Char_IsAlphaNum
inline bool Char_IsAlphaNum(
c8 chr
)

Check if a given character is alphanumeric (alphabet letter and numbers)

Parameters
chr
c8

The character to check

Return

FALSE if the given character is not a alphabetic or numeric.

String
String_Length
inline u8 String_Length(
const c8* str
)

Get the length of a given string

Parameters
str
const c8*

The string to check

Return

String length.

String_Copy
inline void String_Copy(
c8* dst,
const c8* src
)

Copy a source string to a destination buffer

Parameters
dst
c8*

Destination string (buffer must be large enough to fit the source string size)

src
const c8*

Source string

String_FromUInt8ZT
void String_FromUInt8ZT(
u8 value,
c8* string
)

Create a zero-terminated string from a 8-bits unsigned integer String buffer must be at least 4 bytes length (will be padded with '0')

Parameters
value
u8

Integer value to convert

string
c8*

Destination string

String_FromUInt8
void String_FromUInt8(
u8 value,
c8* string
)

Create a string from a 8-bits unsigned integer (string is not zero-terminated) String buffer must be at least 3 bytes length (will be padded with '0') Original version derived from Galandros work (https://​wikiti​.brandonw​.net​/index​.php​?title=Z80_Routines:Other:DispA)

Parameters
value
u8

Integer value to convert

string
c8*

Destination string

String_FromUInt16ZT
void String_FromUInt16ZT(
u16 value,
c8* string
)

Create a zero-terminated string from a 16-bits unsigned integer String buffer must be at least 6 bytes length (will be padded with '0')

Parameters
value
u16

Integer value to convert

string
c8*

Destination string

String_FromUInt16
void String_FromUInt16(
u16 value,
c8* string
)

Create a string from a 16-bits unsigned integer (string is not zero-terminated) String buffer must be at least 5 bytes length (will be padded with '0') Original version by Milos "baze" Bazelides (http://​map​.grauw​.nl​/sources​/external​/z80bits​.html​#5​.1)

Parameters
value
u16

Integer value to convert

string
c8*

Destination string

String_Format
void String_Format(
c8* dest,
const c8* format,
...
)

Build a zero-terminated string

Data format: %[0]<padding><type>
Type: i 16 bits signed integer
d (same)
I 32 bits signed integer (need STRING_USE_INT32 flag)
D (same)
x 16 bits hexadecimal
X 32 bits hexadecimal (need STRING_USE_INT32 flag)
c 8 bits character
s Zero-terminated string
Padding: Padding for integer and hexadecimal
[0] Padding with 0 (otherwise padding with space)
Parameters
dest
c8*

Destination string buffer (must big enough to contain the whole string)

format
const c8*

Formating string

...

Variable number of parameter (must match the Formating string)