On Wednesday, 31 December 2014 at 11:19:36 UTC, 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()
{
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
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
Thanks for the help.
Laeeth