// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************** * Copyright (C) 1997-2016, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************** * * File brkiter.h * * Modification History: * * Date Name Description * 02/18/97 aliu Added typedef for TextCount. Made DONE const. * 05/07/97 aliu Fixed DLL declaration. * 07/09/97 jfitz Renamed BreakIterator and interface synced with JDK * 08/11/98 helena Sync-up JDK1.2. * 01/13/2000 helena Added UErrorCode parameter to createXXXInstance methods. ******************************************************************************** */ #ifndef BRKITER_H #define BRKITER_H #include "unicode/utypes.h" /** * \file * \brief C++ API: Break Iterator. */ #include "unicode/utypes.h" #if U_SHOW_CPLUSPLUS_API #if UCONFIG_NO_BREAK_ITERATION U_NAMESPACE_BEGIN /* * Allow the declaration of APIs with pointers to BreakIterator * even when break iteration is removed from the build. */ class BreakIterator; U_NAMESPACE_END #else #include "unicode/uobject.h" #include "unicode/unistr.h" #include "unicode/chariter.h" #include "unicode/locid.h" #include "unicode/ubrk.h" #include "unicode/strenum.h" #include "unicode/utext.h" #include "unicode/umisc.h" U_NAMESPACE_BEGIN /** * The BreakIterator class implements methods for finding the location * of boundaries in text. BreakIterator is an abstract base class. * Instances of BreakIterator maintain a current position and scan over * text returning the index of characters where boundaries occur. * <p> * Line boundary analysis determines where a text string can be broken * when line-wrapping. The mechanism correctly handles punctuation and * hyphenated words. * <p> * Sentence boundary analysis allows selection with correct * interpretation of periods within numbers and abbreviations, and * trailing punctuation marks such as quotation marks and parentheses. * <p> * Word boundary analysis is used by search and replace functions, as * well as within text editing applications that allow the user to * select words with a double click. Word selection provides correct * interpretation of punctuation marks within and following * words. Characters that are not part of a word, such as symbols or * punctuation marks, have word-breaks on both sides. * <p> * Character boundary analysis allows users to interact with * characters as they expect to, for example, when moving the cursor * through a text string. Character boundary analysis provides correct * navigation of through character strings, regardless of how the * character is stored. For example, an accented character might be * stored as a base character and a diacritical mark. What users * consider to be a character can differ between languages. * <p> * The text boundary positions are found according to the rules * described in Unicode Standard Annex #29, Text Boundaries, and * Unicode Standard Annex #14, Line Breaking Properties. These * are available at http://www.unicode.org/reports/tr14/ and * http://www.unicode.org/reports/tr29/. * <p> * In addition to the C++ API defined in this header file, a * plain C API with equivalent functionality is defined in the * file ubrk.h * <p> * Code snippets illustrating the use of the Break Iterator APIs * are available in the ICU User Guide, * https://unicode-org.github.io/icu/userguide/boundaryanalysis/ * and in the sample program icu/source/samples/break/break.cpp * */ class U_COMMON_API BreakIterator : public UObject { … }; #ifndef U_HIDE_DEPRECATED_API inline UBool BreakIterator::isBufferClone() { … } #endif /* U_HIDE_DEPRECATED_API */ U_NAMESPACE_END #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ #endif /* U_SHOW_CPLUSPLUS_API */ #endif // BRKITER_H //eof