N
N
Nikita Shidlovsky2020-07-16 22:49:28
C++ / C#
Nikita Shidlovsky, 2020-07-16 22:49:28

How to parse string into byte[]?

There is a LINE which contains an ARRAY of BYTES (byte[]). It is necessary to parse (not convert) this string into byte[]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2020-07-17
@402d

https://streletzcoder.ru/preobrazovanie-stroki-vm...
If I understood correctly, then you were looking for an analogue of java String.getBytes
or is it yours to convert?
But are you sure that exactly those bytes that came from outside are in the line?
in almost all languages/platforms.
When data is read from the stream, it is converted to the internal encoding.
Those. starting to read the binaries, you need to say in what encoding the data is expected.
Where and how did the bytes get into the string?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question