cn.dreampie.common.util
类 Stringer

java.lang.Object
  继承者 cn.dreampie.common.util.Stringer

public class Stringer
extends Object

Created by wangrenhui on 15/1/23.


构造方法摘要
Stringer()
           
 
方法摘要
static String camelCase(String name)
          将下划线方式命名的字符串转换为驼峰式。
static String firstLowerCase(String name)
          首字母转小写
static String firstUpperCamelCase(String name)
           
static String firstUpperCase(String name)
          首字母转大写
static String underlineCase(String name)
          将驼峰式命名的字符串转换为下划线方式。
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Stringer

public Stringer()
方法详细信息

firstLowerCase

public static String firstLowerCase(String name)
首字母转小写

参数:
name - 转换前的字符串
返回:
转换后的字符串

firstUpperCase

public static String firstUpperCase(String name)
首字母转大写

参数:
name - 转换前的字符串
返回:
转换后的字符串

underlineCase

public static String underlineCase(String name)
将驼峰式命名的字符串转换为下划线方式。如果转换前的驼峰式命名的字符串为空,则返回空字符串。
例如:HelloWorld->hello_world

参数:
name - 转换前的驼峰式命名的字符串
返回:
转换后下划线大写方式命名的字符串

camelCase

public static String camelCase(String name)
将下划线方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。
例如:hello_world->HelloWorld

参数:
name - 转换前的下划线大写方式命名的字符串
返回:
转换后的驼峰式命名的字符串

firstUpperCamelCase

public static String firstUpperCamelCase(String name)


Copyright © 2015. All rights reserved.