examples icon indicating copy to clipboard operation
examples copied to clipboard

example suggestion: How to do multiline strings in Roc?

Open Anton-4 opened this issue 1 year ago • 2 comments

Inspiration: https://gist.github.com/rtfeldman/35846b441ba011fe3bfef31890591223#syntax

Anton-4 avatar Dec 05 '23 15:12 Anton-4

Clarifying question, this is the kind of example you are expecting right?

greeting = "Hello Sahil\nThis is a multi-line string"

ghost avatar Dec 16 '23 08:12 ghost

I think more like

query =
    """
    UPDATE sessions
    SET user_id = \(Num.toStr user.id)
    WHERE session_id = \(Num.toStr sessionId);
    """

lukewilliamboswell avatar Dec 16 '23 08:12 lukewilliamboswell