Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Iterate string

import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
 
class Main
{
    // Iterate over the characters of a string
    public static void main(String[] args)
    {
        String s = "Techie Delight";
 
        CharacterIterator it = new StringCharacterIterator(s);
 
        while (it.current() != CharacterIterator.DONE)
        {
            System.out.print(it.current());
            it.next();
        }
    }
}
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #Iterate #string
ADD COMMENT
Topic
Name
5+6 =