| Home | “…convert ordinary text into the JavaScript, Perl or ‘C’ programming languages.” |

­Make compact  Max compact line length:­Use quotes for JavaScript ­­ Perl/C file pointer: ­­­­­­­­­

Utility: Convert Text to JavaScript, Perl or C

(Tested using IE6, IE7, Firefox 2 and Firefox 3)

The purpose of this web page is to convert ordinary text into the JavaScript, Perl or “C” programming languages.

Click the button and then try clicking the other buttons to see examples of how this web page works.

NOTE: If the “File pointer:” text box is left blank, then “printf” statements will be used instead of “fprintf” when clicking the button.

1. After clicking , “Copy/Paste” your own text into the large text box above.

2. If you checked “Make compact,” then you might want to enter a value into the “Max compact line length:” text box, otherwise it defaults to 64.

3. If applicable, enter a file pointer name into the “Perl/C file pointer:” text box.

4. Click the , the , or the button.

5. “Copy/paste” the resultant JavaScript, Perl or C code into your JavaScript, Perl, C, or C++ source code.

NOTE: Some lines may end up one character longer or shorter than the “Max line length:,” due to the fact that end of line characters (\n), quote signs ("), back slashes (\), tab characters (\t), and percent signs (%) are each represented by two characters in C: “\n,” “\",” “\\,” “\t,” and “%%,” and end of line characters (\n), apostrophies ('), back slashes (\), and tab characters (\t) are each represented by two characters in JavaScript: “\n,” “\',” “\\,” and “\t.” This is to prevent these two character representations from getting split between two lines, which obviously would not work.

NOTE: This web page was created using Notepad. Except for the background image file, the keyboard command JavaScript file, and the font / color data JavaScript file, it is completely self contained, and the absence of these three files will not cause any problems. Please feel free to save it to your hard drive using “File/Save as….” Double-click on the newly created “LLBest - Utility - Convert Text to C or JavaScript” icon (“Text2C” icon for Firefox), and make it one of your “Favorites.” It will work perfectly even when you are no longer connected to the Internet, or, heaven forbid, when this web page is no longer available!

Questions, comments and suggestions are welcome.
Howard Best ()

| Home | THIS WEB PAGE URL: http://LLBest.com/Text2C.htm |