Rename std.string.toStringz?
Regan Heath
regan at netmail.co.nz
Thu Jun 16 08:09:07 PDT 2011
On Thu, 16 Jun 2011 13:00:23 +0100, Timon Gehr <timon.gehr at gmx.ch> wrote:
> Daniel Gibson wrote:
>> Am 16.06.2011 08:30, schrieb Jonathan M Davis:
>>
>>>
>>> 3. Rename it to toCString (probably renaming toUTF16z to something like
>>> toWCString), so it's then more recognizable to newbies
>>
>> This + keep around aliases for the old names until D3.
+1
> +1. But make it 'toCWString'. :o)
Or toWString (looks nicer to me).
Or toCStr and toWStr (to save 3 characters on each).
winnt.h defines many similar types:
typedef __nullterminated WCHAR *NWPSTR, *LPWSTR, *PWSTR;
typedef __nullterminated PWSTR *PZPWSTR;
typedef __nullterminated CONST PWSTR *PCZPWSTR;
typedef __nullterminated WCHAR UNALIGNED *LPUWSTR, *PUWSTR;
typedef __nullterminated CONST WCHAR *LPCWSTR, *PCWSTR;
typedef __nullterminated PCWSTR *PZPCWSTR;
typedef __nullterminated CONST WCHAR UNALIGNED *LPCUWSTR, *PCUWSTR;
so variations on any of those make sense.
.. I think the toStringz probably came from the winnt.h defines using z..
typedef __nullterminated CHAR *NPSTR, *LPSTR, *PSTR;
typedef __nullterminated PSTR *PZPSTR;
typedef __nullterminated CONST PSTR *PCZPSTR;
typedef __nullterminated CONST CHAR *LPCSTR, *PCSTR;
typedef __nullterminated PCSTR *PZPCSTR;
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list