Results 1 to 2 of 2

Thread: Can you filter appended text? * Resolved *

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Posts
    244

    Can you filter appended text? * Resolved *

    Have a what I hope to be easy question.

    I have a checked list box that gets appended from some queries against the registry. All of the values that I want to have in this box all start with the word "Windows". However there about 30 other entries that do not start with Windows and I do not want them to be appended to the box. Is there any easy way to filter this data or should I just do something like store it in a variable, trim it to the first 7 chars and before it is written do an IF statement on it?

    Thanks for the advice,

    Jim
    Last edited by jlegan; May 19th, 2003 at 05:12 PM.

  2. #2
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    Not sure what you are asking. If you want only the strings that begin with "Windows", then you would use something like :
    VB Code:
    1. If strFoo.StartsWith("Windows") = True Then
    2.     'Do someting
    3. End If

    If you want to trim off the "Windows" portion, then use something like:
    VB Code:
    1. strFoo = strFoo.SubString(6)

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