Thread: strtok and string delimiters

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    7

    strtok and string delimiters

    I´ve been using strtok to parse a user line in commands, for simulating a shell. The problem is with string delimiters, like ">>".
    strtok treats only chars delimiters, not string. Is there anyway to use string delimiters using strtok or another function?

    Thanks in advance

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    look up strstr()
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading in data from Text file
    By fortune2k in forum C Programming
    Replies: 214
    Last Post: 04-10-2008, 11:12 AM
  2. String tokenizer and delimiters
    By John_L in forum C Programming
    Replies: 5
    Last Post: 11-06-2007, 07:22 PM
  3. String to int using strtok and strtol
    By jtullo in forum C Programming
    Replies: 2
    Last Post: 05-06-2007, 04:37 PM
  4. converting string to integer, for further use
    By shoobsie in forum C Programming
    Replies: 2
    Last Post: 07-01-2005, 03:12 AM
  5. Again Character Count, Word Count and String Search
    By client in forum C Programming
    Replies: 2
    Last Post: 05-09-2002, 11:40 AM