1 /* Word breaks in Unicode strings.
2 Copyright (C) 2001-2003, 2005-2024 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2009.
5 This file is free software.
6 It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
7 You can redistribute it and/or modify it under either
8 - the terms of the GNU Lesser General Public License as published
9 by the Free Software Foundation, either version 3, or (at your
10 option) any later version, or
11 - the terms of the GNU General Public License as published by the
12 Free Software Foundation; either version 2, or (at your option)
14 - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+".
16 This file is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License and the GNU General Public License
22 You should have received a copy of the GNU Lesser General Public
23 License and of the GNU General Public License along with this
24 program. If not, see <https://www.gnu.org/licenses/>. */
39 /* ========================================================================= */
41 /* Property defined in Unicode Standard Annex #29, section "Word Boundaries"
42 <https://www.unicode.org/reports/tr29/#Word_Boundaries> */
44 /* Possible values of the Word_Break property.
45 This enumeration may be extended in the future. */
66 WBP_EB
= 18, /* obsolete */
67 WBP_EM
= 19, /* obsolete */
68 WBP_GAZ
= 20, /* obsolete */
69 WBP_EBG
= 21, /* obsolete */
73 /* Return the Word_Break property of a Unicode character. */
75 uc_wordbreak_property (ucs4_t uc
)
78 /* ========================================================================= */
82 /* Determine the word break points in S, and store the result at p[0..n-1].
83 p[i] = 1 means that there is a word boundary between s[i-1] and s[i].
84 p[i] = 0 means that s[i-1] and s[i] must not be separated.
87 u8_wordbreaks (const uint8_t *s
, size_t n
, char *p
);
89 u16_wordbreaks (const uint16_t *s
, size_t n
, char *p
);
91 u32_wordbreaks (const uint32_t *s
, size_t n
, char *p
);
93 ulc_wordbreaks (const char *s
, size_t n
, char *_UC_RESTRICT p
);
95 /* ========================================================================= */
102 #endif /* _UNIWBRK_H */