mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
Merge pull request #8322 from roc-lang/import-str
add str import to docs
This commit is contained in:
commit
d4aeb105be
1 changed files with 10 additions and 0 deletions
|
|
@ -49,6 +49,16 @@
|
|||
##
|
||||
## Interpolation can be used in multiline strings, but the part inside the parentheses must still be on one line.
|
||||
##
|
||||
## ### Import Str from File
|
||||
##
|
||||
## To avoid verbose code to read the contents of a file into a Str, you can import it directly:
|
||||
##
|
||||
## ```
|
||||
## import "some-file.txt" as some_str : Str
|
||||
## ```
|
||||
##
|
||||
## Note: The file content is included in the Roc app executable, if you publish the executable, you do not need to provide the file alongside it.
|
||||
##
|
||||
## ### Escapes
|
||||
##
|
||||
## There are a few special escape sequences in strings:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue