"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.17.5/lib/isc/include/isc/utf8.h" (4 Sep 2020, 927 Bytes) of package /linux/misc/dns/bind9/9.17.5/bind-9.17.5.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "utf8.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 /*! \file isc/utf8.h */
   13 
   14 #pragma once
   15 
   16 #include <isc/lang.h>
   17 #include <isc/types.h>
   18 
   19 ISC_LANG_BEGINDECLS
   20 
   21 bool
   22 isc_utf8_bom(const unsigned char *buf, size_t len);
   23 /*<
   24  * Returns 'true' if the string of bytes in 'buf' starts
   25  * with an UTF-8 Byte Order Mark.
   26  *
   27  * Requires:
   28  *\li   'buf' != NULL
   29  */
   30 
   31 bool
   32 isc_utf8_valid(const unsigned char *buf, size_t len);
   33 /*<
   34  * Returns 'true' if the string of bytes in 'buf' is a valid UTF-8
   35  * byte sequence otherwise 'false' is returned.
   36  *
   37  * Requires:
   38  *\li   'buf' != NULL
   39  */
   40 
   41 ISC_LANG_ENDDECLS