Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

How to convert string to bytes? #694

Answered by svend
svend asked this question in Q&A
Discussion options

You must be logged in to vote

Answer from @mpvl on Slack:

Use interpolation:

s: "a string"
b: bytes
b: '\(s)'
s: "a string"
b: 'a string'

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by svend
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants