Help with Strings? Thanks...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rikkuswirls
    New Member
    • Oct 2006
    • 5

    #1

    Help with Strings? Thanks...

    I'm in Introduction to Computer Programming, so I'm definitely new to this. My teacher doesn't... teach as much as he just deals out assignments, so sorry if I'm asking what one would call a "stupid" question. I appreciate any help, though! What we -need- is a book. Sigh.

    Anyway.
    In a windows console program, how would one go about checking to see if a string contains numbers, letters, spaces, ect.?

    Thanks again.
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Originally posted by rikkuswirls
    I'm in Introduction to Computer Programming, so I'm definitely new to this. My teacher doesn't... teach as much as he just deals out assignments, so sorry if I'm asking what one would call a "stupid" question. I appreciate any help, though! What we -need- is a book. Sigh.

    Anyway.
    In a windows console program, how would one go about checking to see if a string contains numbers, letters, spaces, ect.?

    Thanks again.

    Take a look at InStr()

    Comment

    • rikkuswirls
      New Member
      • Oct 2006
      • 5

      #3
      Okay. Thanks!

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by rikkuswirls
        Okay. Thanks!
        If you're still reading, you may also want to consider using the MID() function, perhaps in a FOR...NEXT loop, to pick out and look at each character in the string.

        Comment

        Working...