
IntlBreakIterator::following 메소드는 이전 위치와 현재 위치 사이의 문자열을 반환합니다.
예제를 살펴보겠습니다.
#hostingforum.kr
cpp
#include
#include
#include
int main() {
UErrorCode status = U_ZERO_ERROR;
UBreakIterator* breakIterator = ucol_open("en_US", &status);
UBreakIterator* iterator = ucol_getBreakIterator(breakIterator, "Hello, World!", &status);
// 이전 위치와 현재 위치 사이의 문자열을 반환합니다.
UChar* buffer = new UChar[100];
int32_t length = ucol_getFollowing(iterator, buffer, 100, &status);
std::string result(buffer, length);
std::cout << result << std::endl;
delete[] buffer;
ucol_close(breakIterator);
return 0;
}
IntlBreakIterator::following 메소드는 이전 위치가 현재 위치보다 앞에 위치할 경우, 이전 위치부터 현재 위치까지의 문자열을 반환합니다.
2025-03-04 21:32