mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
Introduce strterm(), hard-add terminating '\0' at end of buffer
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
55c49a0bf0
commit
212083b922
3 files changed
+14
-6
No files matched your search
@@ -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_ */
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user