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

9 lines
127 B
PowerShell
Raw Permalink Normal View History

2026-04-30 12:34:36 -04:00
function isNumeric ($x) {
try {
0 + $x | Out-Null
return $true
} catch {
return $false
}
}