Python-style multi-line string continuations in Julia

Viewed 164

In python, you can use the \ symbol at the end of a line to concatenate a string on the next line. Is there a similar construct in Julia?

For example, I'd like to log a long line of text as one line:

@info "asdasd asdasd asdasd asdasd asdasd asdasd asdasd asdasd asdasd asdasd asdasd ..... end of line"

How can I wrap that text over two lines, to make it easier to read in my editor?

1 Answers

If you're trying to avoid introducing newline characters, then the simplest option is to use * as the string concatenation operator:

@info "asdasd asdasd asdasd asdasd asdasd asdasd asdasd " *
    "asdasd asdasd asdasd asdasd ..... end of line"
Related