> 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

Reply via email to