January 27, 2011 Re: hex strings | ||||
---|---|---|---|---|
| ||||
Posted in reply to spir | spir <denis.spir@gmail.com> wrote: > Adds one char compared to D syntax, but allows partially hex-coded string: > "blah #xx xxxx xxx# blah" I like having the ability to embed #'s in my strings, thank you. -- Simen |
January 27, 2011 Re: hex strings | ||||
---|---|---|---|---|
| ||||
Posted in reply to spir | On 01/26/2011 05:57 PM, spir wrote:
> On 01/26/2011 07:25 PM, Ellery Newcomer wrote:
>> just out of curiosity, does anyone use these and actually mean them to be
>> strings? It seems like I'm invariably writing
>>
>> cast(ubyte[]) x"..."
>
> Super-nice for universal text. Anything you can't type in because of
> non-illimited keyboard size...
>
> Actually had a similar idea, except using in-string delimiters #...#
> instead of a prefix:
> "#xx xxx xxxx xxx#"
> Adds one char compared to D syntax, but allows partially hex-coded string:
> "blah #xx xxxx xxx# blah"
>
> Denis
personally, I always use \uxxxx or \Uxxxxxxxx [and then print it out to the console, copy it, and paste it back into my code]
|
Copyright © 1999-2021 by the D Language Foundation