comparison qt/d2/qt/qtd/Str.d @ 218:438877e90dbe

D2 windows fixes
author eldar
date Tue, 14 Jul 2009 17:07:32 +0000
parents 7dd099050621
children 27497bbe62a1
comparison
equal deleted inserted replaced
217:3855c7a9a5a2 218:438877e90dbe
9 * 9 *
10 */ 10 */
11 11
12 module qt.qtd.Str; 12 module qt.qtd.Str;
13 13
14 version (Tango) 14 import std.utf : toUTF8;
15 {
16 public import tango.text.convert.Utf : toUTF8 = toString;
17 alias char[] string;
18 }
19 else
20 {
21 import std.utf : toUTF8;
22 }
23 15
24 version(D_Version2) { 16 version(D_Version2) {
25 private import core.sys.posix.stdio; 17 // private import core.sys.posix.stdio;
26 private import core.stdc.string; 18 private import core.stdc.string;
27 19
28 version = druntime; 20 version = druntime;
29 } 21 }
30 22
43 argv[argc] = null; 35 argv[argc] = null;
44 36
45 return argv; 37 return argv;
46 } 38 }
47 39
48 version(Tango) {
49 import tango.stdc.stringz : toStringz, fromStringz;
50 }
51
52
53 public string fromStringz(const (char) *s) 40 public string fromStringz(const (char) *s)
54 { 41 {
55 return s ? s[0 .. strlen(s)].idup : cast(string)null; 42 return s ? s[0 .. strlen(s)].idup : cast(string)null;
56 } 43 }
57 44