Thread: function similar to strpos() ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378

    function similar to strpos() ?

    hey, i was wondering if there was a function similar to strpos() in PHP to test if certain characters exist within a string? i say similar because i'm looking for something that will test a string for a set of characters, but the characters wont necessarily be next to each other.


    or the way i thought about doing it, was to add all the possibilities to a multi-dimensional array and then strcmp()'ing each element with the test string in a loop..only problem is, i dont know how to access the members of the array, lol. but lets say theres 5 possibilities and out of those 5, i want to test if 4 of them are a combination of 1,2,3,4 2,3,4,5 or 3,4,5,6. the best way to accomplish this would be.... ?

    thanks
    Last edited by willc0de4food; 10-06-2005 at 09:08 PM.
    Registered Linux User #380033. Be counted: http://counter.li.org

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strpos() function in c?
    By mikewagan in forum C Programming
    Replies: 3
    Last Post: 03-19-2008, 06:05 AM
  2. dllimport function not allowed
    By steve1_rm in forum C++ Programming
    Replies: 5
    Last Post: 03-11-2008, 03:33 AM
  3. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  4. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM