1 /* $NetBSD: string.h,v 1.1 2024/02/18 20:57:54 christos Exp $ */ 2 3 /* 4 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 5 * 6 * SPDX-License-Identifier: MPL-2.0 7 * 8 * This Source Code Form is subject to the terms of the Mozilla Public 9 * License, v. 2.0. If a copy of the MPL was not distributed with this 10 * file, you can obtain one at https://mozilla.org/MPL/2.0/. 11 * 12 * See the COPYRIGHT file distributed with this work for additional 13 * information regarding copyright ownership. 14 */ 15 16 #pragma once 17 18 /*! \file isc/string.h */ 19 20 #include <string.h> 21 22 #include "isc/lang.h" 23 #include "isc/platform.h" 24 25 ISC_LANG_BEGINDECLS 26 27 #if !defined(HAVE_STRLCPY) 28 size_t 29 strlcpy(char *dst, const char *src, size_t size); 30 #endif /* !defined(HAVE_STRLCPY) */ 31 32 #if !defined(HAVE_STRLCAT) 33 size_t 34 strlcat(char *dst, const char *src, size_t size); 35 #endif /* if !defined(HAVE_STRLCAT) */ 36 37 #if !defined(HAVE_STRNSTR) 38 char * 39 strnstr(const char *s, const char *find, size_t slen); 40 #endif /* if !defined(HAVE_STRNSTR) */ 41 42 int 43 isc_string_strerror_r(int errnum, char *buf, size_t buflen); 44 45 ISC_LANG_ENDDECLS 46