Closed ghost closed 7 months ago
If you don't like C#'s syntax, you could have a look at Go's backquoted strings. But Go's syntax has more limitations than C#'s:
https://stackoverflow.com/questions/4423951/how-to-put-a-backquote-in-a-backquoted-string
Added, here is an example:
v1 := $"c:\documents\files\u0066.txt";
v2 := "c:\\documents\\files\\u0066.txt";
v1->Equals(v2)->PrintLine();
I got the idea from C#:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/verbatim
C# interpolated strings started with
$
character:https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated
Objeck strings support interpolation by default, so you could reuse the
$
character, or simply use the@
character like C#.