#include "unicode/utypes.h"
#if !UCONFIG_NO_CONVERSION
#include "unicode/putil.h"
#include "cstring.h"
#include "cmemory.h"
#include "unicode/ustring.h"
#include "unicode/unistr.h"
#include "unicode/ucnv.h"
#include "ucnv_imp.h"
#include "putilimp.h"
#include "ustr_cnv.h"
#include "ustr_imp.h"
U_NAMESPACE_BEGIN
#if !U_CHARSET_IS_UTF8
UnicodeString::UnicodeString(const char *codepageData) {
fUnion.fFields.fLengthAndFlags = kShortString;
if(codepageData != 0) {
doCodepageCreate(codepageData, (int32_t)uprv_strlen(codepageData), 0);
}
}
UnicodeString::UnicodeString(const char *codepageData,
int32_t dataLength) {
fUnion.fFields.fLengthAndFlags = kShortString;
if(codepageData != 0) {
doCodepageCreate(codepageData, dataLength, 0);
}
}
#endif
UnicodeString::UnicodeString(const char *codepageData,
const char *codepage) { … }
UnicodeString::UnicodeString(const char *codepageData,
int32_t dataLength,
const char *codepage) { … }
UnicodeString::UnicodeString(const char *src, int32_t srcLength,
UConverter *cnv,
UErrorCode &errorCode) { … }
#if !U_CHARSET_IS_UTF8
int32_t
UnicodeString::extract(int32_t start,
int32_t length,
char *target,
uint32_t dstSize) const {
return extract(start, length, target, dstSize, 0);
}
#endif
int32_t
UnicodeString::extract(int32_t start,
int32_t length,
char *target,
uint32_t dstSize,
const char *codepage) const
{ … }
int32_t
UnicodeString::extract(char *dest, int32_t destCapacity,
UConverter *cnv,
UErrorCode &errorCode) const
{ … }
int32_t
UnicodeString::doExtract(int32_t start, int32_t length,
char *dest, int32_t destCapacity,
UConverter *cnv,
UErrorCode &errorCode) const
{ … }
void
UnicodeString::doCodepageCreate(const char *codepageData,
int32_t dataLength,
const char *codepage)
{ … }
void
UnicodeString::doCodepageCreate(const char *codepageData,
int32_t dataLength,
UConverter *converter,
UErrorCode &status)
{ … }
U_NAMESPACE_END
#endif