stellar / rs-soroban-env

Rust environment for Soroban contracts.
Apache License 2.0
60 stars 39 forks source link

Add host fns for concatenating strings #1187

Open leighmcculloch opened 8 months ago

leighmcculloch commented 8 months ago

A couple times I've seen folks ask how to concatenate Strings. Strings in Soroban are just Bytes and their type is just a name to change how tooling might present those bytes.

Related Discord discussion: https://discord.com/channels/897514728459468821/1162161366854013039/1171851834751721472

jayz22 commented 2 weeks ago

Similar issue https://github.com/stellar/rs-soroban-sdk/issues/1280 We might be solving it on the sdk side by leveraging bytes_append host function and the String<-> Bytes interop.