C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 08-02-2009, 05:16 PM   #1
Registered User
 
Join Date: Aug 2009
Posts: 1
Question how to see if one string is contained in the other

hey guys, i have a question about writing a function where the user is prompted to input 2 strings, and "determine if the second is in the first."

anybody have any ideas how one would go about doing this?
bigal1496 is offline   Reply With Quote
Old 08-02-2009, 05:23 PM   #2
Registered User
 
GL.Sam's Avatar
 
Join Date: Aug 2009
Posts: 39
It's actually a standard function from string.h header.

Quote:
char *strstr(const char * s1, const char * s2);

This function returns a pointer to the first occurrence of string s2 in string s1. The function returns the null pointer if the string is not found.
GL.Sam is offline   Reply With Quote
Reply

Tags
function, input, string

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OOP Question DB Access Wrapper Classes digioz C# Programming 2 09-07-2008 04:30 PM
Message class ** Need help befor 12am tonight** TransformedBG C++ Programming 1 11-29-2006 11:03 PM
Classes inheretance problem... NANO C++ Programming 12 12-09-2002 03:23 PM
creating class, and linking files JCK C++ Programming 12 12-08-2002 02:45 PM
Warnings, warnings, warnings? spentdome C Programming 25 05-27-2002 06:49 PM


All times are GMT -6. The time now is 10:44 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22