Italian Libreria Codice fiscale free

pappicio

Active Member
Licensed User
io invece posto il check del codice fiscale in una piccolissima sub:

B4X:
Sub checkcode(s As String) As Boolean
   If s.Length <> 16 Then
   Return False
   End If
   For x = 0 To s.Length - 1
   Dim ss As String = s.SubString2(x, x + 1)
     Select Case x + 1
       Case 1, 2, 3, 4, 5, 6, 9, 12, 16
       If IsNumber(ss) = True Then
       Return False
       End If
       Case 7, 8, 10, 11, 13, 14, 15
       If IsNumber(ss) = False Then
       Return False
       End If
     End Select
   Next
   Return True
End Sub
 
Top