RosettaCodeData/Task/Determine-if-a-string-is-numeric/Haxe/determine-if-a-string-is-numeric.haxe
2023-07-01 13:44:08 -04:00

11 lines
257 B
Text

static function isNumeric(n:String):Bool
{
if (Std.parseInt(n) != null) //Std.parseInt converts a string to an int
{
return true; //as long as it results in an integer, the function will return true
}
else
{
return false;
}
}