Results 1 to 8 of 8

Thread: can't get rid of that line...

Threaded View

  1. #6
    Addicted Member stevess's Avatar
    Join Date
    May 2001
    Posts
    251
    The problem is that the string returned from nget is still 50 characters long. Trim does not remove Null characters (or ASCII zeros)

    Add this Function

    Function TrimCString(sStr As String) As String

    Dim i As Integer

    i = InStr(sStr, Chr$(0))

    Select Case i

    Case 0
    TrimCString = sStr

    Case 1
    TrimCString = QQ

    Case Else
    TrimCString = Left$(sStr, i - 1)

    End Select

    End Function
    Note: QQ is constant for ""

    Then do
    Select Case TrimCString(TxtStr)
    Last edited by stevess; Jun 3rd, 2001 at 05:32 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width