
	                	                 IntlIterator::current() 함수는 IntlIterator 객체의 현재 값을 반환하는 함수입니다. 
 IntlIterator 객체를 생성한 후, 이터레이터를 초기화한 후 current() 함수를 호출하면 현재 값이 반환됩니다. 
 IntlIterator 객체를 생성하는 방법은 다음과 같습니다.
#hostingforum.kr
cpp
IntlIterator iterator;
이터레이터를 초기화하는 방법은 다음과 같습니다.
#hostingforum.kr
cpp
iterator.init();
현재 값을 반환받는 방법은 다음과 같습니다.
#hostingforum.kr
cpp
auto currentValue = iterator.current();
IntlIterator::current() 함수를 사용하여 현재 값이 반환되는지 확인하는 예제는 다음과 같습니다.
#hostingforum.kr
cpp
#include 
#include 
int main() {
    // IntlIterator 객체 생성
    icu::UnicodeString str = "Hello, World!";
    icu::Locale locale("en_US");
    icu::BreakIterator* iterator = icu::BreakIterator::createCharacterInstance(locale);
    // 이터레이터 초기화
    iterator->setText(str);
    // 현재 값을 반환받기
    auto currentValue = iterator->current();
    // 현재 값을 출력하기
    std::cout << "Current Value: " << currentValue << std::endl;
    return 0;
}
이 예제에서는 IntlIterator::current() 함수를 사용하여 현재 값이 반환되는지 확인하고, 반환된 값을 출력합니다.
2025-03-07 14:12