byte array to string

FeepingCreature feepingcreature at gmail.com
Thu Feb 25 06:58:51 UTC 2021


On Thursday, 25 February 2021 at 06:57:57 UTC, FeepingCreature 
wrote:
> On Thursday, 25 February 2021 at 06:47:11 UTC, Mike wrote:
>> hi all,
>>
>> If i have an array:
>> byte[3] = [1,2,3];
>>
>> How to get string "123" from it?
>>
>> Thanks in advance.
>
> string str = format!"%(%s)"(array);

Er sorry, typo, that should be "%(%s%)". "Print the elements of 
the array, separated by nothing." Compare "%(%s, %)" for a comma 
separated list.


More information about the Digitalmars-d-learn mailing list