CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Posts
    230

    looking for tool that format long text string to valid c char*

    Hello all i looking for a tool that takes long text string to valid const char *fmt
    for example i want to set char* with this java script as string:
    http://code.google.com/p/swfobject/
    Thanks

  2. #2
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,042

    Re: looking for tool that format long text string to valid c char*

    Code:
    int main()
    {
        const char* spam = "...";
    }
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

  3. #3
    Join Date
    Aug 2006
    Posts
    230

    Re: looking for tool that format long text string to valid c char*

    i cant just copy the java script i need tool that will properly escape the string before i can set the char *

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: looking for tool that format long text string to valid c char*

    Quote Originally Posted by umen View Post
    i cant just copy the java script i need tool that will properly escape the string before i can set the char *
    That "tool" is called writing code.

    You have a string, so write a function that takes a string and returns a properly escaped string. Do you know how to do that? (this is a C++ forum, so I would expect you're writing things in C++).

    Regards,

    Paul McKenzie

  5. #5
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: looking for tool that format long text string to valid c char*

    First you need a tool that can formulate a proper question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured