On 12/31/14 1:41 AM, bitwise wrote:
It would be nice if that cast was made implicit though.
Just realizing now that DateTime doesn't have sub-second accuracy =/
Why do you need DateTime and not SysTime?
I'm actually surprised it doesn't have that too...
-Steve
Argh - no way to edit.
What's best practice here?
D strings are not null-terminated.
===
cpling.c
char* cpling(char *s)
{
s[0]='!';
return s;
}
===
dcaller.d
extern(C) char* cpling(char* s);
void callC()
{
writefln(%s,fromStringz(cpling(hello\0)));
}
or
void callC()
{
What's best practice here?
D strings are not null-terminated.
char* cpling(char *s)
{
So toString(This i
Am I missing a more agreeable way to check the return value of a
C function against NULL. It's fine if it's a char*, but if it
returns a pointer to some kind of struct, one has to go through
and convert each instance of NULL to a cast of the appropriate
return type. Eg cast(funnystruct*)0
On 1/01/2015 12:22 a.m., Laeeth Isharc wrote:
Am I missing a more agreeable way to check the return value of a C
function against NULL. It's fine if it's a char*, but if it returns a
pointer to some kind of struct, one has to go through and convert each
instance of NULL to a cast of the
On 12/31/2014 8:29 PM, Rikki Cattermole wrote:
On 1/01/2015 12:22 a.m., Laeeth Isharc wrote:
Am I missing a more agreeable way to check the return value of a C
function against NULL. It's fine if it's a char*, but if it returns a
pointer to some kind of struct, one has to go through and
V Wed, 31 Dec 2014 11:19:35 +
Laeeth Isharc via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com napsáno:
Argh - no way to edit.
What's best practice here?
D strings are not null-terminated.
===
cpling.c
char* cpling(char *s)
{
s[0]='!';
return s;
}
===
dcaller.d
On 12/31/2014 8:19 PM, Laeeth Isharc wrote:
Argh - no way to edit.
What's best practice here?
D strings are not null-terminated.
===
cpling.c
char* cpling(char *s)
{
s[0]='!';
return s;
}
===
dcaller.d
extern(C) char* cpling(char* s);
void callC()
{
On Wednesday, 31 December 2014 at 11:45:33 UTC, Mike Parker wrote:
On 12/31/2014 8:19 PM, Laeeth Isharc wrote:
Argh - no way to edit.
What's best practice here?
D strings are not null-terminated.
===
cpling.c
char* cpling(char *s)
{
s[0]='!';
return s;
}
===
dcaller.d
extern(C) char*
On Wednesday, 31 December 2014 at 12:25:45 UTC, John Colvin wrote:
String literals can implicitly convert to const(char)* or
immutable(char)*. Neat. It doesn't appear to apply to array
literals in general though...
I believe this is a special case specifically for strings added
for
So far attempts to run regex on binary data causes
Invalid UTF-8 sequence.
Attempts to pass ubyte also didn't work out.
On Wednesday, 31 December 2014 at 15:36:19 UTC, Darrell wrote:
So far attempts to run regex on binary data causes
Invalid UTF-8 sequence.
Attempts to pass ubyte also didn't work out.
I doubt using anything except (d,w)string is supported or
possible.
Why do you need DateTime and not SysTime?
I'm actually surprised it doesn't have that too...
-Steve
Initially I was looking for something that would be the
equivalent to DateTime in C#. This now appears to be SysTime, not
DateTime in D.
It seems the only real reason to use DateTime is as
Thanks for the help.
Laeeth
Thanks for the help.
Laeeth
On Wed, 31 Dec 2014 15:36:16 +
Darrell via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
So far attempts to run regex on binary data causes
Invalid UTF-8 sequence.
Attempts to pass ubyte also didn't work out.
current regex engine assumes that you are using UTF-8 encoded
16 matches
Mail list logo