Char()
Returns the character specified by the ASCII character code in the first parameter. An optional second parameter specifies the number of times to repeat the character.
This function supports the extended ASCII character set (codes 0–255).
The Char()
function has two parameters:
characterCode
(string): Required. An ASCII character code.numRepetitions
(number): The number of times to repeat the character.
To use the function, pass it an ASCII character code.
The function returns ¾
.
You can use the second parameter to repeat the specified character. This example repeats a character three times.
The function returns AAA
.
This function is helpful for situations that require you to refer to unprintable characters. This example pulls content from a data extension. It then uses the Replace()
function to replace the carriage return and line feed (CRLF) characters with an HTML <br />
tag. The character code for the carriage return character is 13, and the code for line feed is 10.