Ticket #120 (assigned idea)

Opened 10 years ago

Last modified 10 years ago

Support verbatim string notation

Reported by: gauthier Owned by: Chuck
Priority: medium Milestone: Cobra 0.9
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:


have support for csharp verbatim string equivalent.


bigraw.patch Download (15.3 KB) - added by hopscc 10 years ago.

Change History

Changed 10 years ago by hopscc

How is that different from cobra raw string

a = r"xyzzy [a+b] %c"

Changed 10 years ago by Chuck

He may have just missed it, since he doesn't reference it.

But C# also allows its version of the raw string to span lines and includes the \r\n in the result. Cobra currently does not.

I would like Python style mult-line strings at some point, but probably with indentation as the Python and C# approaches tend to either ruin code formatting or have extra leading whitespace per line in the string contents.

Changed 10 years ago by hopscc

so thats something like the  uber-Raw string discussed a while back.

Would it be preferable to have a new construct support \r\n and some form of whitespace control or allow the existing raw string construct to handle newlines
( and have another construct to control whitespace with newline).

Changed 10 years ago by hopscc

  • owner set to hopscc
  • status changed from new to assigned

Changed 10 years ago by hopscc

Working on this now initially having syntax

a = R' ......

Auto remove indentation if indented to expected level
optional support for '|' bounding
support both R'...' and R"..." syntaxes.

Changed 10 years ago by hopscc

Changed 10 years ago by hopscc

Patch for multiline raw string ( bigraw string) using syntax


tests and relnote

supports auto indent trimming and line edge bounding with '|'
Rough notes and examples in test file.

see also forum discussion item in
 Multiline Strings
which I'm going to write next.

Changed 10 years ago by hopscc

  • owner changed from hopscc to Chuck

Pox, Forgot to move the state of this bug back to chuck for response/action.

Changed 10 years ago by gauthier

I tried the sharp'@""' notation but it's breaking after the first carriage.

As a temporary workaround, is there a possibility to support this:


Changed 10 years ago by hopscc

Perhaps bug report it as a bug/feature request against the sharp string literal


sharp literal not support multiline strings....

Note: See TracTickets for help on using tickets.