On Monday, 24 March 2014 at 16:35:42 UTC, Brad Anderson wrote:
On Monday, 24 March 2014 at 16:30:37 UTC, Gary Willoughby wrote:
Is there a standard way to parse hex strings into numbers?
I have the following returned as a string:
0xac036f90
Is there a standard way to parse this
On Monday, 24 March 2014 at 16:30:37 UTC, Gary Willoughby wrote:
Is there a standard way to parse hex strings into numbers?
I have the following returned as a string:
0xac036f90
Is there a standard way to parse this into a ulong or do you
just roll your own?
To accepts a radix
Is there a standard way to parse hex strings into numbers?
I have the following returned as a string:
0xac036f90
Is there a standard way to parse this into a ulong or do you just
roll your own?
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
spir wrote:
Adds one char compared to D syntax, but allows partially hex-coded
string:
"blah #xx xxx# blah"
I like having the ability to embed #'s in my strings, thank you.
--
Simen
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...
Act
On Wednesday 26 January 2011 11:53:32 Ellery Newcomer wrote:
> On 01/26/2011 01:35 PM, Jonathan M Davis wrote:
> > On Wednesday, January 26, 2011 11:29:59 bearophile wrote:
> >> Jonathan M Davis:
> >>> That's legal?
> >>
> >> They are a part of
Simen kjaeraas:
> > cast(ubyte[]) x"..."
>
> Never used them, tbh. But shouldn't that be
>
> cast(ubyte[]) x"...".dup
Maybe it's to avoid such mistakes that C++ has const_cast separated from other
casts.
Bye,
bearophile
On 01/26/2011 02:16 PM, Simen kjaeraas wrote:
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"..."
Never used them, tbh. But shouldn't that be
cast(ubyte[]) x"...".dup
?
yeah,
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"..."
Never used them, tbh. But shouldn't that be
cast(ubyte[]) x"...".dup
?
--
Simen
On 01/26/2011 01:35 PM, Jonathan M Davis wrote:
On Wednesday, January 26, 2011 11:29:59 bearophile wrote:
Jonathan M Davis:
That's legal?
They are a part of D language, search for "Hex Strings" here:
http://www.digitalmars.com/d/2.0/lex.html
It always seems like there'
On Wednesday, January 26, 2011 11:29:59 bearophile wrote:
> Jonathan M Davis:
> > That's legal?
>
> They are a part of D language, search for "Hex Strings" here:
> http://www.digitalmars.com/d/2.0/lex.html
It always seems like there's at least one more thing
Jonathan M Davis:
> That's legal?
They are a part of D language, search for "Hex Strings" here:
http://www.digitalmars.com/d/2.0/lex.html
Bye,
bearophile
On Wednesday, January 26, 2011 10:25:29 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"..."
That's legal? I thought that x went in front of hex literals, not strings. I
wouldn'
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"..."
15 matches
Mail list logo