Talk:Binary strings: Difference between revisions

Line 29:
::: Maybe there's a method in the String class that says Java not to "interpret" the string, or maybe such a task in Java should be accomplished using a custom class innerly using byte[]. --[[User:ShinTakezou|ShinTakezou]] 21:53, 15 April 2009 (UTC)
::::Java has a String method <tt>toByteArray()</tt>, but I think the actual tasks need to be customized. --[[User:Mwn3d|Mwn3d]] 22:14, 15 April 2009 (UTC)
 
== Comment: PureBasic does not have real binary strings ==
 
I would like to comment on the given PureBasic code for binary strings.
 
The example code using variables with a $ postfix and string literals
enclosed in double quotes (") does use normal PureBasic strings.
 
Those PureBasic strings are 0 terminated.
They may not contain Chr(0)
and therefore are not binary safe.
 
If you want to handle "strings made of arbitrary bytes" in PureBasic,
you could use memory buffers or byte arrays,
but the code required for handling such,
is more evolved, than I am prepared to produce at this moment.
Anonymous user