Skip to content
Snippets Groups Projects
  • Per Hedbor's avatar
    2028f82c
    Added a new string syntax · 2028f82c
    Per Hedbor authored
    They will all start and end a literal string.
    
    A literal string can contain any characters except the end sequence.
    
    The main usecase is writing code in a string.
    
    As an example:
    
    string test = #{
    This is a literal string.
    They can contain any characters, no de-quoting is done at all.
    
    So, as an example, foo "bar" 'gazonk' \
    
    Valid quote sequences are #{, #( and #[.
    They are ended by # followed by }, ) and ], respectively.
    
    So, you can use the two other quotes inside the string, if you want to, like:
    
    Also, no preprocessing is done inside the string.
    
    The main usecase for these strings is to write code in code.
    2028f82c
    History
    Added a new string syntax
    Per Hedbor authored
    They will all start and end a literal string.
    
    A literal string can contain any characters except the end sequence.
    
    The main usecase is writing code in a string.
    
    As an example:
    
    string test = #{
    This is a literal string.
    They can contain any characters, no de-quoting is done at all.
    
    So, as an example, foo "bar" 'gazonk' \
    
    Valid quote sequences are #{, #( and #[.
    They are ended by # followed by }, ) and ], respectively.
    
    So, you can use the two other quotes inside the string, if you want to, like:
    
    Also, no preprocessing is done inside the string.
    
    The main usecase for these strings is to write code in code.