The only method I have found is a direct cast:
> $numberAsString = \"10\" > [int]$numberAsString 10
Is this the standard approach in
$source = "number35" $number=$null $result = foreach ($_ in $source.ToCharArray()){$digit="0123456789".IndexOf($\_,0);if($digit -ne -1){$number +=$\_}}[int32]$number
Just feed it digits and it wil convert to an Int32
Int32