zmk_mf68/app/include/zmk/stdlib.h
Peter Johanson 7430750428 refactor(splits): Minor cleanups to periph invocation
* Add strlcpy from public domain version.
* Leverage strlcpy to detect truncation of behavior dev strs, and log.
* Use `offsetof` for cleaner detection on peripheral side.
2022-01-31 23:03:34 -05:00

19 lines
No EOL
360 B
C

/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <stdlib.h> /* for size_t */
/*
* ANSI C version of strlcpy
* Based on the NetBSD strlcpy man page.
*
* Nathan Myers <ncm-nospam@cantrip.org>, 2003/06/03
* Placed in the public domain.
*/
size_t strlcpy(char *dst, const char *src, size_t size);