Results 1 to 5 of 5

Thread: Stripnulls Explanation

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Knowledge_is_Et's Avatar
    Join Date
    Dec 2001
    Location
    An Oak.
    Posts
    305

    Stripnulls Explanation

    VB Code:
    1. Function StripNulls(OriginalStr As String) As String
    2. If (InStr(OriginalStr, Chr(0)) > 0) Then
    3. OriginalStr = Left(OriginalStr, InStr(OriginalStr, Chr(0)) - 1)
    4. End If
    5. StripNulls = OriginalStr
    6. End Function

    Ok, I know what that does, but I'm not so familiar with string functions, so... how does it work... and why do I get nulls from c++ but I can't add nulls to a string? like:

    VB Code:
    1. for I = 0 to 10
    2. stringname = stringname & null (or vbNull?)
    3. next i
    Last edited by Knowledge_is_Et; Sep 8th, 2002 at 10:47 PM.
    Now returning to the world of VB. Please make sure your seatbelts are securely fastened and all trays are in their upright and locked position.

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