RosettaCodeData/Task/Determine-if-a-string-is-numeric/PowerShell/determine-if-a-string-is-numeric-1.psh

9 lines
127 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
function isNumeric ($x) {
try {
0 + $x | Out-Null
return $true
} catch {
return $false
}
}