Ru ..  Characters > to 127 are printable... But terminals sometime
replace non printable chars by those one

2015-12-29 0:56 GMT+01:00 Ru Vuott <vu...@yahoo.it>:
>
>> and Ru Vuott  thanks for suggestion i'll try later
>
>
> If the string has 2 or more no-printable characters, you have to modify my 
> code, so:
>
> Public Sub Main()
>
>    Dim s As String = "ab" & Chr(180) & "cd ef" & Chr(185) & "g" & Chr(195) & 
> "hil" & Chr(179) & " mnop"
>    Dim bb As Byte[]
>    Dim b As Byte
>    Dim i As Integer
>
>     Print s
>
>     With bb = Byte[].FromString(s)
>       i = .Count
>     End With
>
>     While b < i
>       If Not IsAscii(Chr(bb[b])) Then
>         bb.Remove(b)
>         Dec i
>       Endif
>       Inc b
>     Wend
>
>     s = bb.ToString(0, bb.count)
>
>     Print s
>
> End
> ****************************************************
>
> Saludosss  ;-)
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard

------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to