1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-20 03:16:45 +00:00

Standard library improvements

This commit is contained in:
Karol Stasiak
2018-12-19 19:01:53 +01:00
parent 30d18fba01
commit 05884f2c7b
17 changed files with 236 additions and 68 deletions
+25
View File
@@ -0,0 +1,25 @@
[< back to index](../index.md)
## string
The `string` module automatically imports the `err` module.
#### `byte strzlen(pointer str)`
Calculates the length of a null-terminated string.
If the string is longer than 255 bytes, then the behaviour is undefined (might even crash).
#### `sbyte strzcmp(pointer str1, pointer str2)`
Compares two strings. Returns 0 if equal, non-0 if not equal.
If any of the strings is longer than 255 bytes, then the behaviour is undefined (might even crash).
#### `void strzcopy(pointer dest, pointer src)`
Copies the source null-terminated string into the destination buffer.
If the source string is longer than 255 bytes, then the behaviour is undefined (might even crash).
#### `word strz2word(pointer str)`
Converts a null-terminated string to a number.
Sets `errno`.