Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.text.TextUtils;

public class Main {
    public static String toLowerCase(String strSrc) {
        if (TextUtils.isEmpty(strSrc)) {
            return strSrc;
        }
        char[] chars = strSrc.toCharArray();
        if (chars == null) {
            return strSrc;
        }
        for (int i = 0; i < chars.length; i++) {
            char c = chars[i];
            if ('A' <= c && c <= 'Z') {
                chars[i] = (char) (c + 'a' - 'A');
            }
        }
        return String.valueOf(chars);
    }
}