You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently supported to go from str<n> to [u8; n] but not the other way around.
For anything string-based it would be useful to allow going back to str to not confuse it with bytes.
This is particularly useful for contracts where we wish to return a string, but have a compressed variant stored. Casting to str would allow us to have the decoder know that it is a string returned and not just bytes
Discussed in https://github.com/orgs/noir-lang/discussions/3962
Originally posted by LHerskind January 5, 2024
Problem
It is currently supported to go from
str<n>
to[u8; n]
but not the other way around.For anything string-based it would be useful to allow going back to
str
to not confuse it with bytes.This is particularly useful for contracts where we wish to return a string, but have a compressed variant stored. Casting to
str
would allow us to have the decoder know that it is a string returned and not just bytesHappy Case
Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: