Merge pull request #8322 from roc-lang/import-str

add str import to docs
This commit is contained in:
Anton-4 2025-10-22 16:34:53 +02:00 committed by GitHub
commit d4aeb105be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: