newbie: raw multiline string? #25927
-
|
How can i put a multiline part of bash script into string variable? BTW, i've tried to use a code: and it gave me an error: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
|
All strings in V can be multi-line strings - there is no special syntax needed. Just hit ENTER where appropriate. s := r'
echo asdasdasd
| grep qweqwe
| grep zxczxc
' |
Beta Was this translation helpful? Give feedback.
-
|
How are you using the string? |
Beta Was this translation helpful? Give feedback.
Imagine i need to paste in that "raw multiline string" not 3 lines, but 333, with a lot of
'and"in it...OK, now the only way is - to paste this "raw multiline string" into file and use $embed_file("that-file") on it. then we'll have got what i needed. So it is not a big problem to me. I've just wanted to know if there is r"""...""" case to use.