Mercurial > projects > dwt-linux
comparison dwt/internal/mozilla/nsStringAPI.d @ 293:3dfa75c74ed2
merge
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 07 Aug 2008 15:16:09 +0200 |
parents | 93409d9838c5 b0bd1789106b |
children | eec6ddb07873 |
comparison
equal
deleted
inserted
replaced
292:695802b523c0 | 293:3dfa75c74ed2 |
---|---|
78 nsAString result; | 78 nsAString result; |
79 NS_StringSetData(&result, cast(PRUnichar*)s, uint.max); | 79 NS_StringSetData(&result, cast(PRUnichar*)s, uint.max); |
80 return result; | 80 return result; |
81 } | 81 } |
82 | 82 |
83 static wchar[] getString16( nsAString* str ) | |
84 { | |
85 wchar* buffer = null; | |
86 PRBool terminated; | |
87 uint len = NS_StringGetData(str, &buffer, &terminated); | |
88 return buffer[0 .. len].dup; | |
89 } | |
90 | |
83 private: | 91 private: |
84 void *v; | 92 void *v; |
85 } | 93 } |
86 | 94 |
87 struct nsACString | 95 struct nsACString |
172 ******************************************************************************/ | 180 ******************************************************************************/ |
173 | 181 |
174 struct nsDependentSubstring_external{} | 182 struct nsDependentSubstring_external{} |
175 struct nsDependentCSubstring_external{} | 183 struct nsDependentCSubstring_external{} |
176 | 184 |
185 /****************************************************************************** | |
186 | |
187 ******************************************************************************/ | |
188 | |
189 PRUint32 strlen_PRUnichar ( PRUnichar* str ) | |
190 { | |
191 PRUint32 len = 0; | |
192 if (str !is null) | |
193 while (*(lparg0++) != 0) len++; | |
194 ret len; | |
195 } |