Edu Posted May 18, 2017 Report Share Posted May 18, 2017 Bom dia! Alguém sabe como posso testar se há caracteres hexadecimal numa string? Tentei com a função IsXDigit(), mas retorna erro: Unrecoverable error 9023: hb_xgrab requested to allocate zero bytes. Grato. Quote Link to comment Share on other sites More sharing options...
joaosolution Posted May 18, 2017 Report Share Posted May 18, 2017 Edu Boa tarde Function Testa_String(pString) cLetras := "ABCDEFGHIJKLMNOPQRSTUVWXYabcdefghijklmnopqrstuvwxz0123456789" For x:=1 To Len(pString) If !(SubStr(pString,x,1) $ cLetras) Return .F. Endif Next Return .T. Att João Bosco Quote Link to comment Share on other sites More sharing options...
Edu Posted May 18, 2017 Author Report Share Posted May 18, 2017 João. Acho que não funcionaria pois não tenho como saber qual o tamanho do hexadecimal e nessa função está testando bit a bit. Ex: Caracter: Ç em hexadecimal é : xC7. Caracter: º em hexadecimal é: xBA. Quote Link to comment Share on other sites More sharing options...
joaosolution Posted May 18, 2017 Report Share Posted May 18, 2017 Edu Mas qual a origem dessa string? É um campo de baco de dados? Está lendo de um arquivo texto? Xml? Excel? Você têm um exemplo da String para nos mostrar? Att João Bosco Quote Link to comment Share on other sites More sharing options...
emotta Posted May 19, 2017 Report Share Posted May 19, 2017 Xará, vc simular a situação em um fonte pequeno que da pra outras pessoas executarem e simularem o problema? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.