skip to main content
Corticon Studio: Rule Modeling Guide : Rule writing techniques and logical equivalents : Including apostrophes in strings
 

Try Corticon Now

Including apostrophes in strings

String values in Corticon Studio are always enclosed in single quotes. But occasionally, you may want the String value to include single quote or apostrophe characters. If you enter the following text in Corticon Studio:
entity1.string1=‘Jane's dog Spot’
The text will turn 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 quotes or apostrophes, you must use the special character backslash (\) that tells Corticon Studio to ignore the apostrophe(s) as follows:
entity1.string1=‘Jane\'s dog Spot’
When preceded by the backslash, the second apostrophe will be 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.