On Wed, 31 Dec 2014 15:36:16 +
Darrell via Digitalmars-d-learn
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 text. i
really want regex eng
Thanks for the help.
Laeeth
Thanks for the help.
Laeeth
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 a
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.
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 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 convenienc
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* cpl
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()
{
writefln("%s",fromStringz(cpling(
V Wed, 31 Dec 2014 11:19:35 +
Laeeth Isharc via Digitalmars-d-learn
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
>
> extern(C) char
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 convert
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 appropri
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
What's best practice here?
D strings are not null-terminated.
char* cpling(char *s)
{
So toString("This i
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()
{
writefln("
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
16 matches
Mail list logo