# String Builder

###### Updated: Oct 22, 2017

String Builder is used to convert multi-line string into code that can be copy pasted and used directly inside a programming language.

Settings

##### Output: String Builder Text

Background Information

We all use text files everyday. Be it a list of file paths, names of people or things to do. There is often a need to quickly manipulate lines of text in a particular form. Sorting is one such operation. Read more at wikipedia.

## Settings Explained

• ### Output Style

The output style contains presets for various programming languages such as C#, Java, JavaScript & PHP. All the other settings are dependent upon this. You can select Custom if you want to customize the individual settings.

#### C# & Java

This is the setting for the C# & Java programming languages. The values for this preset are:- Enclose Character " Escape Character \ Concatenate Character + Space before concatenate character Yes Start Character Empty End Character ;
"{" +
"    \"name\": \"John Doe\"," +
"    \"age\": 69" +
"}";

#### JavaScript

This is the setting for the JavaScript programming language. The values for this preset are:- Enclose Character ' Escape Character \ Concatenate Character + Space before concatenate character Yes Start Character Empty End Character ;
'{' .
'    "name": "John Doe",' .
'    "age": 69' .
'}';

#### PHP

This is the setting for the PHP programming language. The values for this preset are:- Enclose Character ' Escape Character \ Concatenate Character . Space before concatenate character Yes Start Character Empty End Character ;
'{' .
'    "name": "John Doe",' .
'    "age": 69' .
'}';

#### Custom

This allows you to customize the individual settings for the following:-
• Enclosing Character
• Escape Character
• Concatenate Character
• Space before concatenate character
• Start Character
• End Character

• ### Enclose Character

This is the character with which strings on each line are surrounded. Typically, this is either double quote (") or single quote ('). Some languages such as PHP treat " differently in that variable substitutions are allowed. While in JavaScript, it is a matter of convenience as you can use whichever character (between " and ' that does not appear as a literal) as your string encloser.

• ### Escape Character

If the enclosing character appears in the string, this character is used to escape it, thus making it a literal value. This is typically backslash (\) in most programming languages.

• ### Concatenate Character

Each line of string is concatenated by this character. This is usually the plus (+) operator in most programming languages. In PHP it is the dot (.) operator

• ### Start Character

In some languages such as C#, the first line of the string can start with special characters such as: @@ (verbatim string) or \$ (format string)

• ### End Character

This is the terminator at the very end of the last line of the output. Typically this is semi-colon (;) for languages modelled after C/C++

• ### Space Before Concatenate Character

This can help improve readability by putting a space between the ending encloser for the string and the string concatenator.

## You may also like...

#### Duplicate Line Remover

Find and remove duplicate lines from text in a case sensitive or insensitive manner, remove empty lines, trim whitespace & sort lines

#### Line Merger

Join lines of string by removing line breaks or newlines and adding a delimiter (default space) of your choice between each line

#### Line Sorter

Sort lines of text alphabetically or using natural sort. Lines can also be reversed, randomized or sorted by length of characters