ctype.h for string type?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kenneth6
    New Member
    • Mar 2007
    • 79

    #1

    ctype.h for string type?

    ctype.h:
    toupper(c), tolower(c): change case of char
    isalphanum(c), isalpha(c), isdigit(c), ispunct(c), isspace(c), iscntrl(c), islower(c), isupper(c): boolean checks on type of char

    i know this is for char type.

    If the data i am using is in string type, how can i use these functions or do the similar tasks with the string type data?
  • Laharl
    Recognized Expert Contributor
    • Sep 2007
    • 849

    #2
    You can use a loop check each character in the string with the ctype functions. Beyond that, you're writing your own, though I imagine someplace there's a third party (aka nonstandard) C regular expressions library...

    Comment

    Working...