+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
-* Copyright (c) 2003, International Business Machines
+* Copyright (c) 2003-2011, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Author: Alan Liu
#ifndef _RULEITER_H_
#define _RULEITER_H_
-#include "unicode/utypes.h"
+#include "unicode/uobject.h"
U_NAMESPACE_BEGIN
* @author Alan Liu
* @since ICU 2.8
*/
-class U_COMMON_API RuleCharacterIterator {
+class RuleCharacterIterator : public UMemory {
// TODO: Ideas for later. (Do not implement if not needed, lest the
// code coverage numbers go down due to unused methods.)
/**
* Bitmask option to enable skipping of whitespace. If (options &
- * SKIP_WHITESPACE) != 0, then whitespace characters will be silently
- * skipped, as if they were not present in the input. Whitespace
- * characters are defined by UCharacterProperty.isRuleWhiteSpace().
+ * SKIP_WHITESPACE) != 0, then Pattern_White_Space characters will be silently
+ * skipped, as if they were not present in the input.
*/
enum { SKIP_WHITESPACE = 4 };
/**
* An opaque object representing the position of a RuleCharacterIterator.
*/
- struct Pos {
+ struct Pos : public UMemory {
private:
const UnicodeString* buf;
int32_t pos;
* resynchronize the iterator.
* @param result a string to receive the characters to be returned
* by future calls to next()
+ * @param maxLookAhead The maximum to copy into the result.
* @return a reference to result
*/
- UnicodeString& lookahead(UnicodeString& result) const;
+ UnicodeString& lookahead(UnicodeString& result, int32_t maxLookAhead = -1) const;
/**
* Advances the position by the given number of 16-bit code units.
* @param result output parameter to receive a string
* representation of this object
*/
- UnicodeString& toString(UnicodeString& result) const;
+// UnicodeString& toString(UnicodeString& result) const;
private:
/**