How to include apostrophes in strings
- Last Updated: June 9, 2021
- 1 minute read
- Corticon
- Version 7.2
- Documentation
String values in Corticon Studio are always enclosed in single quotation marks. But occasionally, you may want the String value to include single quotation marks, or apostrophes. If you enter the following text in Corticon Studio:
entity1.string1='Jane's dog Spot'The text turns red, because Corticon Studio thinks that the string1
value is 'Jane' and the remaining text s dog Spot' is invalid.
To properly express a String value that includes single quotation marks or
apostrophes, you must use the special character backslash (\) that tells Corticon Studio to
ignore the apostrophe, as shown:
entity1.string1='Jane\'s dog Spot'
When preceded by the backslash, the second apostrophe is ignored and assumed to be just another character within the String. This notation works in all sections of the Rulesheet, including values sets. It also works in the Possible Values section of the Vocabulary Editor.