substring

S

sk

Is there a function in C that can tell me whether one string exists in
another string?

i.e. returns 0 is the word "hello" is in the string "ajkhfyeajhk
hellojklajljdsfas," or something like that...
 
N

None

sk said:
Is there a function in C that can tell me whether one string exists in
another string?

i.e. returns 0 is the word "hello" is in the string "ajkhfyeajhk
hellojklajljdsfas," or something like that...

Have a look at strstr() in string.h.
-None
 
S

sk

sk said:
Is there a function in C that can tell me whether one string exists in
another string?

i.e. returns 0 is the word "hello" is in the string "ajkhfyeajhk
hellojklajljdsfas," or something like that...

Thank you both! Sorry if it was a dumb question, I'm still trying to
find my way around C. Thank you again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,183
Messages
2,570,965
Members
47,511
Latest member
svareza

Latest Threads

Top