package com.yeejoin.equipmanage.common.utils;

public class CustomUtil {

	/**
	 * 去掉末尾的0
	 * 
	 * @return
	 */
	public static String removeLastZero(String str) {
		char[] chars = str.toCharArray();
		String newStr = str;
		for (int i = chars.length - 1; i >= 0; i--) {
			if ("0".equals(String.valueOf(chars[i]))) {
				newStr = str.substring(0, i);
			} else {
				break;
			}
		}
		return newStr;
	}
}
