Code example for StreamTokenizer

Methods: lowerCaseModenextToken

0
import junit.framework.TestCase; 
 
public class StreamTokenizerTest extends TestCase {
    public void testLowerCase() throws Exception { 
        Locale.setDefault(Locale.US);
        StreamTokenizer st = new StreamTokenizer(new StringReader("aIb aIb"));
        st.lowerCaseMode(true);
        st.nextToken();
        assertEquals("aib", st.sval);
 
        Locale.setDefault(new Locale("tr", "TR"));
        st.nextToken();
        assertEquals("a\u0131b", st.sval);
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE