Minor improvements to the string-related functions.

This commit is contained in:
Enrico Fraccaroli (Galfurian)
2023-08-30 11:51:25 -04:00
parent c82c13417d
commit 78c1ff4bd4
3 changed files with 77 additions and 90 deletions
+2 -2
View File
@@ -173,11 +173,11 @@ char *strtok_r(char *str, const char *delim, char **saveptr);
/// @brief Parses the string using the separator, and at each call it saves the
/// parsed token in buffer. The pointer `string` will be modified.
/// @param string cursor used to parse the string, it will be modified.
/// @param separator the separator we are using.
/// @param separators the list of separators we are using.
/// @param buffer the buffer where we save the parsed token.
/// @param buflen the length of the buffer.
/// @return 1 if we still have things to parse, 0 if we finished parsing.
int tokenize(char **string, char separator, char *buffer, ssize_t buflen);
int tokenize(char *string, char *separators, size_t *offset, char *buffer, ssize_t buflen);
/// @brief Copies the values of num bytes from the location pointed by source
/// to the memory block pointed by destination.