Special String Characters
- Updated2025-03-28
- 1 minute(s) read
When located within the quotes of a string, the following characters are considered known escape sequences. The following table describes how TestStand interprets these characters.
String Character | Interpretation in String |
---|---|
\\ | Backslash |
\n | Line feed |
\r | Carriage return |
\xNN | Hexadecimal character code |
\NN | LabVIEW-style hexadecimal character codeValid only for uncompressed binary data. |
\" | Quote |
\t | Tab |
Note
- Always enclose strings in quotes.
- String literals in TestStand expressions use a backslash as the escape character, similar to other programming languages like C/C++ and C#. Therefore, if you specify a path using a string literal in an expression, such as for the parameter value of a code module, you must use two backslash characters for each actual backslash the string value requires because TestStand interprets the first backslash character as escaping the character after it. If the character after the first backslash has a special meaning, such as \n (new line) or \t (tab), TestStand replaces the backslash character and the character which follows it with the corresponding special character code. However, if you are storing a path directly in a string variable programmatically or by using the Variables view, use one backslash character per actual backslash because, unlike string literals in expressions, the value of a string variable is not considered escaped and TestStand does not interpret the backslash characters in such strings as having any special meaning.