Thread: Stripping quotes from a string

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    3

    Stripping quotes from a string

    Hi all,

    Maybe someone can help me with this problem. I'm trying to replace two following quotes in a string to one quote. For example:

    L 03/15/2006 - 18:17:17: Rcon: "rcon 1033369585 "password" kick "blabla bla bla"" from "123.123.123.123:1234"

    I'm currently using strtok at the quotes to split the complete string in pieces, which i place in an array. Most of the time there are no double sets of quotes (like shown in bold in the example), but sometimes they pop up because someone uses quotes in a rcon command on our gameservers.

    This is when the problem occures. Because i split on the quotes, the array gets shifted, and i get the wrong info when i use that array.

    Is there a way to replace the "" with " so i can use the normal array again? I've tried searching for a good replacement function, but they are hard to find. Even when there are lots of topics about it. Can anyone help me fix this problem?

    It's probably easy for the experts here, but i'm very new in C
    Last edited by -W0kk3L-; 03-15-2006 at 11:27 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 01:02 AM
  2. String issues
    By The_professor in forum C++ Programming
    Replies: 7
    Last Post: 06-12-2007, 09:11 AM
  3. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 03:23 PM
  4. creating class, and linking files
    By JCK in forum C++ Programming
    Replies: 12
    Last Post: 12-08-2002, 02:45 PM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM