All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.portaldalaran.talons.utils.XStringUtils Maven / Gradle / Ivy

Go to download

Expand the toolkit for query, save, and delete Mybatis plus entity associations 对于Mybatis plu的扩展工具,包括关联表查询,以及级联保存、更新、删除

The newest version!
package io.github.portaldalaran.talons.utils;


/**
 * @author [email protected]
 * @version 0.1
 */
public class XStringUtils {
    /**
     * 首字母小写
     * @param str in string
     * @return string
     */
    public static String toLowerFirstCase(String str) {
        char[] chars = str.toCharArray();
        //ASCII  A-Z  65-90  a-z  97-122
        if (chars[0] >= 65 && chars[0] <= 90) {
            chars[0] += 32;
        }
        return String.valueOf(chars);
    }

    /**
     * 首字母大写
     * @param str in string
     * @return string
     */
    public static String toUpperFirstCase(String str) {
        char[] chars = str.toCharArray();
        //ASCII  A-Z  65-90  a-z  97-122
        if (chars[0] >= 97 && chars[0] <= 122) {
            chars[0] -= 32;
        }
        return String.valueOf(chars);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy