Access to the list of edits.
More...
#include <edits.h>
Access to the list of edits.
- See also
- getCoarseIterator
-
getFineIterator
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
Definition at line 92 of file edits.h.
◆ Iterator()
icu::Edits::Iterator::Iterator |
( |
const Iterator & |
other | ) |
|
|
default |
Copy constructor.
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
◆ destinationIndex()
int32_t icu::Edits::Iterator::destinationIndex |
( |
| ) |
const |
|
inline |
- Returns
- the current index into the full destination string
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
Definition at line 162 of file edits.h.
◆ findSourceIndex()
UBool icu::Edits::Iterator::findSourceIndex |
( |
int32_t |
i, |
|
|
UErrorCode & |
errorCode |
|
) |
| |
Finds the edit that contains the source index.
The source index may be found in a non-change even if normal iteration would skip non-changes. Normal iteration can continue from a found edit.
The iterator state before this search logically does not matter. (It may affect the performance of the search.)
The iterator state after this search is undefined if the source index is out of bounds for the source string.
- Parameters
-
- Returns
- TRUE if the edit for the source index was found
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
◆ hasChange()
UBool icu::Edits::Iterator::hasChange |
( |
| ) |
const |
|
inline |
- Returns
- TRUE if this edit replaces oldLength() units with newLength() different ones. FALSE if oldLength units remain unchanged.
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
Definition at line 134 of file edits.h.
◆ newLength()
int32_t icu::Edits::Iterator::newLength |
( |
| ) |
const |
|
inline |
- Returns
- the number of units in the modified string, if hasChange() is TRUE. Same as oldLength if hasChange() is FALSE.
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
Definition at line 145 of file edits.h.
◆ next()
Advances to the next edit.
- Returns
- TRUE if there is another edit
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
Definition at line 109 of file edits.h.
References next().
Referenced by next().
◆ oldLength()
int32_t icu::Edits::Iterator::oldLength |
( |
| ) |
const |
|
inline |
- Returns
- the number of units in the original string which are replaced or remain unchanged.
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
Definition at line 139 of file edits.h.
◆ operator=()
Assignment operator.
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
◆ replacementIndex()
int32_t icu::Edits::Iterator::replacementIndex |
( |
| ) |
const |
|
inline |
- Returns
- the current index into the replacement-characters-only string, not counting unchanged spans
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
Definition at line 157 of file edits.h.
◆ sourceIndex()
int32_t icu::Edits::Iterator::sourceIndex |
( |
| ) |
const |
|
inline |
- Returns
- the current index into the source string
- Draft:
- This API may be changed in the future versions and was introduced in ICU 59
Definition at line 151 of file edits.h.
The documentation for this struct was generated from the following file: