looking for tool to convert unescape string to escapted string [closed]
We don’t allow qu开发者_如何学编程estions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questioni just wander where can i find a tool that takes in my case java script string that is
unescape and converting it to escaped string so i could use it as string value in c++for example characters like " i need to convert it to \"
i need something smart and not just replace all function .Notepad++ would do it well.
Menu TextFX > TextFX Characters > Escape...
![looking for tool to convert unescape string to escapted string [closed] looking for tool to convert unescape string to escapted string [closed]](https://i.stack.imgur.com/uqEtH.png)
Pseudo code similar to C:
while(got_input_data)
{
char = getFirstChar();
if(char == '\"')
{
putchar('\');
putchar('\"');
}
else if( another character that must be escaped )
{
// do similar stuff
}
else
{
// simply print the char that doesn't need to be escaped
putchar(char);
}
}
I don't know if such tools exist but I must admit that I wrote something similar when I needed to put a html page as a string in a CGI that was written in C. Old days ...
加载中,请稍侯......
精彩评论