2

Is there a way to convert BuiltinString or BuiltinByteString to String ?

There are these functions in the module PlutusTx.Builtins.Class

stringToBuiltinByteString :: String -> BuiltinByteString

stringToBuiltinString :: String -> BuiltinString

Are there functions to perform the inverse operation?

1

Yes, per the definition, BuiltinByteString derives Show, so you can write show bbs, where bbs is your variable, and it will convert your BuiltinByteString into a String

1
  • Thanks for pointing this out!
    – gan
    Oct 13 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.