StringBuffer to Lower Case - Java java.lang

Java examples for java.lang:StringBuffer

Description

StringBuffer to Lower Case

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        StringBuffer str = new StringBuffer();
        toLowerCase(str);/*from   w  w  w .jav a  2  s  . c o m*/
    }

    public static void toLowerCase(StringBuffer str) {
        int length = str.length();

        for (int i = 0; i < length; i++) {
            str.setCharAt(i, Character.toLowerCase(str.charAt(i)));
        }

    }
}

Related Tutorials