Mercurial > projects > dwt-linux
diff 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 |
line wrap: on
line diff
--- a/dwt/internal/mozilla/nsStringAPI.d Thu Aug 07 15:02:44 2008 +0200 +++ b/dwt/internal/mozilla/nsStringAPI.d Thu Aug 07 15:16:09 2008 +0200 @@ -80,6 +80,14 @@ return result; } + static wchar[] getString16( nsAString* str ) + { + wchar* buffer = null; + PRBool terminated; + uint len = NS_StringGetData(str, &buffer, &terminated); + return buffer[0 .. len].dup; + } + private: void *v; } @@ -174,3 +182,14 @@ struct nsDependentSubstring_external{} struct nsDependentCSubstring_external{} +/****************************************************************************** + +******************************************************************************/ + +PRUint32 strlen_PRUnichar ( PRUnichar* str ) +{ + PRUint32 len = 0; + if (str !is null) + while (*(lparg0++) != 0) len++; + ret len; +} \ No newline at end of file