123456789 (valid SSN, need to pass)
000000000 (dummy SSN, need to skip)
0 (dummy SSN, need to skip)
So far, here is the TCL proc I have
proc formatSSN { incomingSSN } {
set outgoingSSN {}
if { $incomingSSN ne “” && $incomingSSN ne “000000000” && $incomingSSN ne ” 0″ } {
set outgoingSSN [join [list [string range $incomingSSN 0 2] “-” [string range $incomingSSN 3 4] “-” [string range $incomingSSN 5 8]] “”]
}
return $outgoingSSN
}
I am not well versed with TCL but is there is TCL function to convert string to number? If so what it is. I am wondering if I can convert string to number, then multiple it with 1, and check if the result has a length of 9, I should be good but can’t seem to find the correct function.
Thank you so much.