forked from Fascinated/Bat
22 lines
464 B
Java
22 lines
464 B
Java
package cc.fascinated.bat.common;
|
|
|
|
/**
|
|
* @author Fascinated (fascinated7)
|
|
*/
|
|
public class LongUtils {
|
|
/**
|
|
* Checks if a string is a long
|
|
*
|
|
* @param string the string to check
|
|
* @return if the string is a long
|
|
*/
|
|
public static boolean isLong(String string) {
|
|
try {
|
|
Long.parseLong(string);
|
|
return true;
|
|
} catch (NumberFormatException exception) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|