package kr.co.kihyun.lang;

public class MLong {

	public static Long parseLong(String s) {
		return parseLong(s, null);
	}

	public static Long parseLong(String s, Long earlyValue) {
		try {
			if (s != null) {
				return Long.parseLong(s);
			} else {
				return earlyValue;
			}
		} catch (NumberFormatException ex) {
			return earlyValue;
		}
	}

	public static String toString(int num) {
		return (num > 9) ? ("" + num) : ("0" + num);
	}
}
