# specialCharacter

## Description

Insert special characters in a string of text.

## Input / Parameter

| Name | Description                              | Input Type | Default | Options                                                      | Required |
| ---- | ---------------------------------------- | ---------- | ------- | ------------------------------------------------------------ | -------- |
| type | The type of special character to insert. | Text       | -       | Carriage\_Return, Escape, Horizontal\_Tab, Line\_Feed, Space | Yes      |

Options are as follows:

* Carriage\_Return
  * Control character. ASCII code 13.
* Escape
  * Control character. ASCII code 27. Similar to pressing ‘esc’ key
* Horizontal\_Tab
  * Control character. ASCII code 9. Similar to pressing ‘tab’ key.
* Line\_Feed
  * Control character. ASCII code 10. Similar to pressing ‘enter’ key. Marks the end of a line and the beginning of a new line.
* Space
  * Printable character. ASCII code 32. Similar to pressing ‘space’ key.

## Output

| Description                   | Output Type |
| ----------------------------- | ----------- |
| Returns the special character | String/Text |

## Example

In this example, we will demonstrate how to use special characters in a text operation.

* As most special character is not visible, detecting it can be difficult. We will use it in conjunction with `Text.combine` to see its effect.

### Steps

1. Drag a `button` component into the canvas and open the `Action` tab. Select the `press` event of the button.
2. Add `Log.write` function and add a subflow on its value, then put `Text.combine` inside it. Fill up the parameters accordingly.

   * See `Text.combine` documentation for its usage.
   * For `text2`, add another layer of subflow, then put `Text.specialCharacter` with the `type` selected to `Line_Feed`.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-662c02b3f286159fc77c16b39622e72fda487424%2FspecialCharacter-step-1.png?alt=media)

### Result

1. The console on preview will show the text with the special character applied (as a new line or line break)

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-27f993045444688fad0c7847bad1dc4755bc499f%2FspecialCharacter-result-1.png?alt=media)

## Links

### Related Information
