mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 00:43:32 +00:00
ICU-12139 revert bad change to cstr.cpp. It is intended to use and depend on conversion. It is only intended for use from test and debug code, so the dependency is ok. It must be able to handle non-invariant characters.
X-SVN-Rev: 38386
This commit is contained in:
parent
8f598f6746
commit
2cf8965496
1 changed files with 2 additions and 2 deletions
|
@ -15,11 +15,11 @@ U_NAMESPACE_BEGIN
|
|||
|
||||
CStr::CStr(const UnicodeString &in) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
int32_t length = in.extract(0, in.length(), NULL, (uint32_t)0, US_INV);
|
||||
int32_t length = in.extract(0, in.length(), NULL, (uint32_t)0);
|
||||
int32_t resultCapacity = 0;
|
||||
char *buf = s.getAppendBuffer(length, length, resultCapacity, status);
|
||||
if (U_SUCCESS(status)) {
|
||||
in.extract(0, in.length(), buf, resultCapacity, US_INV);
|
||||
in.extract(0, in.length(), buf, resultCapacity);
|
||||
s.append(buf, length, status);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue