diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..bfba9a6 --- /dev/null +++ b/README.md @@ -0,0 +1,81 @@ +StringWriter +============ + +I have written this class to solve a problem with old c-style c++ code like this: +``` +void g(char *s) { + if (!strncmp(s,"texta\n",6)) + s+=6; + if ( *s == 0 ) + return; + char *xs=strstr(s,"\n\n"); + if (!xs) + return; + char xxs=*xs; + *xs=0; + char ccs[1000]; + strcpy(ccs,s); + *xs=xxs; + s=xs+2; + xs=strstr(s,"\n\n"); + if (!xs) + return; + s=xs+2; + while (y