Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/nsStringAPI.d @ 39:0ecb2b338560
further work on phobosification
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 25 Mar 2009 13:20:43 +0100 |
parents | 950d84783eac |
children |
comparison
equal
deleted
inserted
replaced
38:2e09b0e6857a | 39:0ecb2b338560 |
---|---|
80 nsAString result; | 80 nsAString result; |
81 NS_StringSetData(&result, cast(PRUnichar*)s, uint.max); | 81 NS_StringSetData(&result, cast(PRUnichar*)s, uint.max); |
82 return result; | 82 return result; |
83 } | 83 } |
84 | 84 |
85 static wchar[] toString16( nsAString* str ) | 85 static String16 toString16( nsAString* str ) |
86 { | 86 { |
87 wchar* buffer = null; | 87 wchar* buffer = null; |
88 PRBool terminated; | 88 PRBool terminated; |
89 uint len = NS_StringGetData(str, &buffer, &terminated); | 89 uint len = NS_StringGetData(str, &buffer, &terminated); |
90 return buffer[0 .. len].dup; | 90 return buffer[0 .. len]._idup(); |
91 } | 91 } |
92 | 92 |
93 static char[] toString( nsAString* str ) | 93 static String toString( nsAString* str ) |
94 { | 94 { |
95 return String_valueOf( nsAString.toString16( str ) ); | 95 return String_valueOf( nsAString.toString16( str ) ); |
96 } | 96 } |
97 | 97 |
98 private: | 98 private: |