return lead;
}
+ /**
+ * Returns the code point at the given index relative to the current offset.
+ */
+ public int codePointAt(int index) {
+ return str.codePointAt(start + index);
+ }
+
/**
* Returns true if the first code point of this StringSegment equals the given code point.
*
// License & terms of use: http://www.unicode.org/copyright.html#License
package com.ibm.icu.impl.number.parse;
+import com.ibm.icu.impl.StringSegment;
import com.ibm.icu.text.UnicodeSet;
import com.ibm.icu.util.Currency;
import com.ibm.icu.util.ULocale;
String input = (String) cas[0];
String expectedCurrencyCode = (String) cas[1];
- StringSegment segment = new StringSegment(input, 0);
+ StringSegment segment = new StringSegment(input, true);
ParsedNumber result = new ParsedNumber();
matcher.match(segment, result);
assertEquals("Parsing " + input, expectedCurrencyCode, result.currencyCode);
assertEquals(affixPattern + " " + exactMatch, expectedMatcherLength, matcher.length());
// Check that the matcher works on a sample string
- StringSegment segment = new StringSegment(sampleParseableString, 0);
+ StringSegment segment = new StringSegment(sampleParseableString, true);
ParsedNumber result = new ParsedNumber();
matcher.match(segment, result);
assertEquals(affixPattern + " " + exactMatch,