ASCII2Hex ( text )
Inviato: sabato 30 aprile 2011, 2:25
Solo dalla 10 in su !
Codice: Seleziona tutto
Let ( [
L = Length ( text ) ;
C = Code ( Left ( text ; 1 ) ) ;
Hex = "%" & Div ( C ; 16 ) & Middle ( "0123456789ABCDEF" ; Mod ( C ; 16 ) + 1 ; 1 )
] ;
Case (
C > 126 ; "error" ;
Hex & Case ( L > 1 ; ASCII2Hex ( Right ( text ; L - 1 ) ) )
)
)