Artifact a254af4df57ef3f8e88d0e5c4ce88ad396338f8e1343825d0dffecf37c4089c2:
- File mod/kstr/kssz.fn.c — part of check-in [8d6b36fcac] at 2019-10-30 07:44:12 on branch trunk — factor out write buffer code so any module and libk users can call it; update documentation to match; add kssz string length function (user: lexi, size: 148) [annotate] [blame] [check-ins using]
#include <k/type.h> #include <k/str.h> sz kssz(const char* str, sz max) { const char* end; for (end = str; *end!=0; ++end); return end - str; }