General |
6.43 Estrarre tutte le consonanti o le vocali da una stringa. |
Emanuele Cesena |
Const strConsonanti = "BCDFGHJKLMNPQRSTVWXYZ" Const strVocali = "AEIOU" Function Consonanti(rsParola, cLIST As String) As String 'Autori: Michele Amato & Giovanni Dim llCounter As Long Dim lsChar As String For llCounter = 1 To Len(rsParola) lsChar = Mid(rsParola, llCounter, 1) If InStr(cLIST, UCase(lsChar)) Then Consonanti = Consonanti & lsChar End If Next llCounter End FunctionLa funzione, data una stringa rsParola, ne restituisce una sottostringa composta solo dai caratteri presenti in cLIST. |