String explanations

This commit is contained in:
Micah Kendall 2022-11-27 00:19:18 +11:00 committed by Lucas
parent 8279c592df
commit 568192cc52
1 changed files with 14 additions and 0 deletions

View File

@ -1 +1,15 @@
# String
There are Strings and ByteArrays (plutus bytestrings)
The default representation using double quotes is a string.
```
let mystring = "Hello World!"
```
Strings may be appended and compared.
For char operations, ByteArrays must be used.
ByteArrays have efficient indexing, slicing, and can be compared or concatenated.
ByteArrays can also be useful for non-text data (hence why we call them arrays not strings.)
Due to their fixed byte width, you may find them not suitable for complex structures.