java.text.CharacterIterator;
java.text.StringCharacterIterator;
CharacterIterator it = new StringCharacterIterator("abcd");
// Iterate over the characters in the forward direction
for (char ch=it.first(); ch != CharacterIterator.DONE; ch=it.next()) {
// Use ch ...
}
Reference:
http://www.exampledepot.com/egs/java.text/StrIter.html
No comments:
Post a Comment