Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i read data in string formate #214

Open
Fareeha-Naz opened this issue Aug 19, 2021 · 1 comment
Open

how can i read data in string formate #214

Fareeha-Naz opened this issue Aug 19, 2021 · 1 comment

Comments

@Fareeha-Naz
Copy link

Hi daer!
How can i read data in string formate.... tell me any work around bacouse my server is sending back data in string formate...
its urgent please please give me responce as soon as possible

@martppa
Copy link

martppa commented Sep 3, 2022

Any sort of information you receive is byte formatted. Since a UTF-8 character is 4 bytes in length (32bits), you can turn those bytes into UTF-8 characters. You can do it when creating a string object:

String(bytes: bytes, encoding: .utf8)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants