package com.uas.search.util;

public class CharUtils {

	public static boolean isNumber(char c) {
		return c >= 48 && c <= 57;
	}

	public static boolean isCharacter(char c) {
		return isUpperCharacter(c) || isLowerCharacter(c);
	}

	public static boolean isUpperCharacter(char c) {
		return c >= 65 && c <= 90;
	}

	public static boolean isLowerCharacter(char c) {
		return c >= 97 && c <= 122;
	}

	public static char toUpper(char c) {
		if (isLowerCharacter(c)) {
			return (char) (c - 32);
		}
		return c;
	}
}
