Converting between types (u8, u64, b256, str, String, Vec) in Sway

If you are converting between types in Sway, this is the guide for you:
https://docs.fuel.network/docs/nightly/sway/basics/converting_types/

u8, u64, b256, string etc.

This is coming up in nightly, and highlights all the different conversions you might typically run into in Sway.

If you have others you think might be helpful for other devs that are not in this doc, please post the code below.

4 Likes