Thanks a lot,
I will follow your advise and implement this part same as your
example.
Regards
Kadir Erdem
On Wed, 04 Feb 2015 09:28:27 +, Kadir Erdem Demir wrote:
> I am sorry make a busy community more busy with false alarms.
don't mind it. ;-) "D.learn" is for *any* questions about language, no
matter how strange they may seem.
> How can I write the code below better? How can I reduce the num
don't beleive what you see! ;-)
I am sorry make a busy community more busy with false alarms.
When I write to file I saw Record Separator really exists.
I hope my second question is a valid one.
How can I write the code below better? How can I reduce the
number of foreach? statements.
Fi
On Wed, 04 Feb 2015 08:13:28 +, Kadir Erdem Demir wrote:
> A more general and understandable code for first question :
>
> ubyte[] temp = [ 65, 30, 66, 30, 67]; writeln(temp);
> string tempStr = cast(string) temp;
> writeln (tempStr);
>
> Result is : ABC which is not desired.
You can use C functions in D too:
import core.stdc.stdio;
ubyte[] temp = [ 65, 30, 66, 30, 67, 0];
puts(cast(char*)temp.ptr);
Looks like RS is an unprintable character, that's why you don't
see it in console.
I am opening a .gz file and reading it chunk by chunk for
uncompressing it.
The data in the uncompressed file is like : aRSbRScRSd, There are
record separators(ASCII code 30) between each record(records in
my dummy example a,b,c).
File file = File(mylog.gz, "r");
auto uc = new UnComp