#include <unicode/utypes.h>
#include <unicode/ubrk.h>
#include <unicode/uchar.h>
#include <unicode/uidna.h>
#include <unicode/uscript.h>
#include <unicode/ustring.h>
#include <unicode/utf8.h>
#include <unicode/brkiter.h>
#include <unicode/unistr.h>
#include <unicode/locid.h>
extern "C" {
U_CAPI int8_t U_EXPORT2
u_charType_4_0(UChar32 c)
{
return u_charType(c);
}
}
U_CAPI UBool U_EXPORT2
u_isUWhiteSpace_4_0(UChar32 c)
{
return u_isUWhiteSpace(c);
}
U_CAPI UBool U_EXPORT2
u_isprint_4_0(UChar32 c)
{
return u_isprint(c);
}
U_CAPI UBool U_EXPORT2
u_isWhitespace_4_0(UChar32 c)
{
return u_isWhitespace(c);
}
U_CAPI UBool U_EXPORT2
u_isspace_4_0(UChar32 c)
{
return u_isspace(c);
}
U_CAPI UChar32 U_EXPORT2
u_foldCase_4_0(UChar32 c, uint32_t options) {
return u_foldCase(c, options);
}
U_CAPI UBool U_EXPORT2
u_hasBinaryProperty_4_0(UChar32 c, UProperty which)
{
return u_hasBinaryProperty(c, which);
}
U_CAPI int32_t U_EXPORT2
u_getPropertyValueEnum_4_0(UProperty property,
const char* alias)
{
return u_getPropertyValueEnum(property, alias);
}
U_CAPI UScriptCode U_EXPORT2
uscript_getScript_4_0(UChar32 codepoint, UErrorCode *err)
{
return uscript_getScript(codepoint, err);
}
U_CAPI int32_t U_EXPORT2
u_memcasecmp_4_0(const UChar *s1, const UChar *s2, int32_t length, uint32_t options) {
return u_memcasecmp(s1, s2, length, options);
}
U_CAPI const char * U_EXPORT2
u_errorName_4_0(UErrorCode code)
{
return u_errorName(code);
}
U_CAPI UBreakIterator* U_EXPORT2
ubrk_open_4_0(UBreakIteratorType type,
const char *locale,
const UChar *text,
int32_t textLength,
UErrorCode *status)
{
return ubrk_open(type, locale, text, textLength, status);
}
U_CAPI void U_EXPORT2
ubrk_close_4_0(UBreakIterator *bi)
{
return ubrk_close(bi);
}
U_CAPI void U_EXPORT2
ubrk_setText_4_0(UBreakIterator* bi,
const UChar* text,
int32_t textLength,
UErrorCode* status)
{
return ubrk_setText(bi, text, textLength, status);
}
U_CAPI int32_t U_EXPORT2
ubrk_first_4_0(UBreakIterator *bi)
{
return ubrk_first(bi);
}
U_CAPI int32_t U_EXPORT2
ubrk_last_4_0(UBreakIterator *bi)
{
return ubrk_last(bi);
}
U_CAPI int32_t U_EXPORT2
ubrk_next_4_0(UBreakIterator *bi)
{
return ubrk_next(bi);
}
U_CAPI int32_t U_EXPORT2
ubrk_previous_4_0(UBreakIterator *bi)
{
return ubrk_previous(bi);
}
U_CAPI int32_t U_EXPORT2
ubrk_preceding_4_0(UBreakIterator *bi,
int32_t offset)
{
return ubrk_preceding(bi, offset);
}
U_CAPI int32_t U_EXPORT2
ubrk_following_4_0(UBreakIterator *bi,
int32_t offset)
{
return ubrk_following(bi, offset);
}
U_CAPI int32_t U_EXPORT2
uidna_IDNToUnicode_4_0( const UChar* src, int32_t srcLength,
UChar* dest, int32_t destCapacity,
int32_t options,
UParseError* parseError,
UErrorCode* status)
{
return uidna_IDNToUnicode(src, srcLength, dest, destCapacity, options, parseError, status);
}
U_CAPI int32_t U_EXPORT2
uidna_IDNToASCII_4_0( const UChar* src, int32_t srcLength,
UChar* dest, int32_t destCapacity,
int32_t options,
UParseError* parseError,
UErrorCode* status)
{
return uidna_IDNToASCII(src, srcLength, dest, destCapacity, options, parseError, status);
}
U_CAPI int32_t U_EXPORT2
utf8_appendCharSafeBody_4_0(uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool *pIsError)
{
return utf8_appendCharSafeBody(s, i, length, c, pIsError);
}
namespace icu_4_0 {
class __declspec(dllexport) Locale : public icu::Locale {
public:
Locale(const char* language, const char* country = 0, const char* variant = 0, const char* keywordsAndValues = 0)
: icu::Locale(language, country, variant, keywordsAndValues)
{
}
};
class __declspec(dllexport) UnicodeString : public icu::UnicodeString {
public:
UnicodeString(UBool isTerminated, const UChar *text, int32_t textLength)
: icu::UnicodeString(isTerminated, text, textLength)
{
}
UnicodeString(int32_t capacity, UChar32 c, int32_t count)
: icu::UnicodeString(capacity, c, count)
{
}
UnicodeString()
: icu::UnicodeString()
{
}
UChar *getBuffer(int32_t minCapacity)
{
return icu::UnicodeString::getBuffer(minCapacity);
}
void releaseBuffer(int32_t newLength=-1)
{
return icu::UnicodeString::releaseBuffer(newLength);
}
};
class __declspec(dllexport) BreakIterator : public icu::BreakIterator {
public:
static BreakIterator* U_EXPORT2
createWordInstance(const icu_4_0::Locale& where, UErrorCode& status)
{
return static_cast<BreakIterator*>(icu::BreakIterator::createWordInstance(where, status));
}
};
};