Skip to content

Commit

Permalink
Mention that Soroban Strings are not encoded or validated (#1090)
Browse files Browse the repository at this point in the history
* Mention that Soroban Strings are not encoded or validated

* Update docs/learn/encyclopedia/contract-development/types/built-in-types.mdx

Co-authored-by: Graydon Hoare <[email protected]>

* Update docs/learn/encyclopedia/contract-development/types/built-in-types.mdx

---------

Co-authored-by: Graydon Hoare <[email protected]>
  • Loading branch information
sisuresh and graydon authored Nov 20, 2024
1 parent c0b95bd commit a3bee93
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ Symbols are small efficient strings up to 32 characters in length and limited to

Symbols are primarily used for function names and other identifiers that are exported in the public API of a contract. They can also be used wherever short strings are needed to keep resource costs down.

## Bytes, Strings (`Bytes`, `BytesN`)
## Bytes, Strings (`Bytes`, `BytesN`, `String`)

Byte arrays and strings can be passed to contracts and stores using the `Bytes` type.

For byte arrays of fixed length, `BytesN` can be used. For example, contract IDs are fixed 32-byte byte arrays, and are represented as `BytesN<32>`.

Note that the bytes contained in `String`s do not necessarily conform to any standard text encoding such as ASCII or Unicode UTF-8. They are plain uninterpreted bytes, and users expecting a particular encoding need to enforce that encoding manually.

## Vec (`Vec`)

Vec is a sequential and indexable growable collection type.
Expand Down

0 comments on commit a3bee93

Please sign in to comment.