Page 1 of 1

C, C++, Java String Writer

Posted: Sat Sep 01, 2007 7:33 pm
by Gamall
At one point I needed to write looong strings with lots of "\n" and got bored with that.

So I threw this thing together in 5 minutes or so.

It will convert plain text into the string format used by the languages C, C++, Java etc...

This is to say, carriage return = \n

Of course, \n is converted to \\n ;)
StringWriter.jar
Java Executable Archive (with source)
(10.28 KiB) Downloaded 1135 times
Not much else to say
StringWriter.PNG
StringWriter.PNG (13.62 KiB) Viewed 23557 times

Re: C, C++, Java String Writer

Posted: Sun Sep 02, 2007 12:14 am
by Kafou
http://www.cppreference.com/escape_sequences.html

T'en as oublié :archange

Ca serait surtout pratique pour les tabulations, les apostrophes et les guillemets (en plus des retours à la ligne et des antislashs), en fait. Le reste on s'en fiche :P

Re: C, C++, Java String Writer

Posted: Sun Sep 02, 2007 1:16 pm
by Gamall
Je ne les ai pas "oubliés", c'est juste que je n'en avais pas besoin :lol

C'est au dernier moment, en faisant ça -> viewtopic.php?f=3&t=321, j'avais envie de mettre un texte d'aide GaTeXifié dans l'emplacement des logs, mais la flemme le faire à la main :zzz.

À l'occasion, j'ajouterai le reste. [Ou tu peux le faire en très exactement 72 secondes top-chrono, beta-testing inclus :foufou ]