Introduce strterm(), hard-add terminating '\0' at end of buffer

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2020-01-07 03:02:39 +01:00
1 parent 55c49a0bf0
commit 212083b922
3 files changed
+14 -6

No files matched your search

+6
View File
@@ -52,6 +52,12 @@ void screen_init (void);
void screen_exit (void);
int screen_width (void);
static inline char *strterm(char *str, size_t len)
{
str[len - 1] = 0;
return str;
}
#endif /* FINIT_UTIL_H_ */
/**