linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* comparing char to other known char's
@ 2005-06-22 23:22 James Colannino
  2005-06-22 23:44 ` David L. Martin
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: James Colannino @ 2005-06-22 23:22 UTC (permalink / raw)
  To: linux-c-programming

Hey everyone.  I hope this isn't a stupid question.  I've been googling
around trying to find a function that I can use but haven't been
successful.  Here's what I want to be able to do:

let's say I have a char called 'character.'  I want to compare
'character' to see if it's any one of the characters in a list.  For
example, maybe I would want to test character to see if it's either 'e',
'r', '*', etc.

Is this easy enough to implement?  I could do if (character == 'e' ||
character == [...] and so on and so forth, but this seems much to
tedious and unreadable to be my only solution.  If anyone has any ideas
I'd be extremely grateful :)  Thanks very much in advance.

James

-- 
My blog: http://www.crazydrclaw.com/
My homepage: http://james.colannino.org/

"A well regulated militia being necessary to the security of a free
state, THE RIGHT of the people to keep and bear arms SHALL NOT BE
INFRINGED." --United States Constitution, Second Ammendment


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-06-25 11:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-22 23:22 comparing char to other known char's James Colannino
2005-06-22 23:44 ` David L. Martin
2005-06-22 23:46 ` Eric Bambach
2005-06-23  0:25 ` James Colannino
2005-06-23 13:10 ` Adrian Popescu
2005-06-23 20:40   ` James Colannino
2005-06-23 22:57     ` Eric Bambach
2005-06-23 23:58       ` James Colannino
2005-06-24  0:25       ` James Colannino
2005-06-24  3:34         ` Eric Bambach
2005-06-24  5:48           ` James Colannino
2005-06-24  7:57         ` J.
2005-06-24  8:32         ` Glynn Clements
2005-06-25 11:58 ` HIToC

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).