byte to char safe?
Sergey Gromov
snake.scaly at gmail.com
Fri Jul 31 06:55:24 PDT 2009
Thu, 30 Jul 2009 18:29:09 -0400, Harry wrote:
> BCS Wrote:
>
>> Reply to Harry,
>>
>>> Again hello,
>>>
>>> char[6] t = r"again" ~ cast(char)7 ~ r"hello";
>>>
>>> use only own write functions
>>> is ok?
>>> thank you!
>>>
>>
>> I think this will also work and you can be shure it's safe.
>>
>> r"again" ~ '\x07' ~ r"hello"
>>
>
> again thank you !
>
> D writef not print utf8 control?
> \x00 .. \x1f and \x7f .. \x9f safe for data?
> where \n \t?
>
> sorry so many questions
No, writef does not escape non-printing characters, if that's what you
mean. It prints them as is. You can escape them using std.uri.encode
for instance:
writefln(std.uri.encode(str));
More information about the Digitalmars-d-learn
mailing list