![]() |
| | #1 |
| Registered User Join Date: Jan 2009
Posts: 37
| how can i check that a string contains another string(sub string), like: if i have a string like this: Code: GET /send.htm?Text=PAYLOAD+00500+11611 here the sub string would be "PAYLOAD". how can I do it? Last edited by Ali.B; 08-13-2009 at 04:48 AM. Reason: info added |
| Ali.B is offline | |
| | #2 |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 10,368
| You can use strstr() from <string.h>.
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way |
| laserlight is offline | |
| | #3 |
| Registered User Join Date: Jan 2009
Posts: 37
| could you show me how, with an example code or something ? |
| Ali.B is offline | |
| | #4 |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 10,368
|
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way |
| laserlight is offline | |
| | #5 |
| Registered User Join Date: Jan 2009
Posts: 37
| wow nice ....thanks |
| Ali.B is offline | |
![]() |
| Tags |
| cotains, string |
| Thread Tools | |
| Display Modes | |
|
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 |
| Inheritance Hierarchy for a Package class | twickre | C++ Programming | 7 | 12-08-2007 04:13 PM |
| String issues | The_professor | C++ Programming | 7 | 06-12-2007 09:11 AM |
| Message class ** Need help befor 12am tonight** | TransformedBG | C++ Programming | 1 | 11-29-2006 11:03 PM |
| Calculator + LinkedList | maro009 | C++ Programming | 20 | 05-17-2005 12:56 PM |