GNUstep CoreBase Library 0.2
GSUnicode.h
1/* GSUnicode.h
2
3 Copyright (C) 2014 Free Software Foundation, Inc.
4
5 Written by: Stefan Bidigaray
6 Date: November, 2014
7
8 This file is part of GNUstep CoreBase library.
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; see the file COPYING.LIB.
22 If not, see <http://www.gnu.org/licenses/> or write to the
23 Free Software Foundation, 51 Franklin Street, Fifth Floor,
24 Boston, MA 02110-1301, USA.
25*/
26
27#ifndef __GSUNICODE_H__
28#define __GSUNICODE_H__ 1
29
30#include <CoreFoundation/CFBase.h>
31#include <stdarg.h>
32
77CF_EXPORT CFIndex
78GSUnicodeFromEncoding (UniChar ** d, const UniChar * const dLimit,
79 CFStringEncoding enc, const UInt8 ** s,
80 const UInt8 * const sLimit, const UTF16Char loss);
81
122CF_EXPORT CFIndex
123GSUnicodeToEncoding (UInt8 ** d, const UInt8 * const dLimit,
124 CFStringEncoding enc, const UniChar ** s,
125 const UniChar * const sLimit, const char loss,
126 Boolean addBOM);
132GSUnicodeFormatWithArguments (UniChar * __restrict__ s, CFIndex n,
133 CFTypeRef locale,
134 const UniChar * __restrict__ format,
135 CFIndex fmtlen, va_list ap);
136
138GSUnicodeFormat (UniChar * __restrict__ s, CFIndex n, CFTypeRef locale,
139 const UniChar * __restrict__ format, CFIndex fmtlen, ...);
140#if 0
157CF_EXPORT CFIndex
158GSUnicodeFormat (UniChar * d, UniChar * const dLimit, CFTypeRef locale,
159 const UniChar * f, const UniChar * const fLimit, ...);
160
175CF_EXPORT CFIndex
176GSUnicodeFormatWithArguments (UniChar * d, UniChar * const dLimit,
177 CFTypeRef locale, const UniChar * f,
178 const UniChar * fLimit, va_list ap);
179
181#endif
184#endif /* __GSUNICODE_H__ */
signed long CFIndex
Definition CFBase.h:165
CFIndex GSUnicodeFromEncoding(UniChar **d, const UniChar *const dLimit, CFStringEncoding enc, const UInt8 **s, const UInt8 *const sLimit, const UTF16Char loss)
Convert a string in some external encoding to Unicode (UTF-16).
CFIndex GSUnicodeToEncoding(UInt8 **d, const UInt8 *const dLimit, CFStringEncoding enc, const UniChar **s, const UniChar *const sLimit, const char loss, Boolean addBOM)
Convert a Unicode string (UTF-16) to some external encoding.