System.WideStrUtils.WStrNew
Delphi
function WStrNew(const Str: PWideChar): PWideChar;
C++
extern DELPHI_PACKAGE System::WideChar * __fastcall WStrNew(const System::WideChar * Str);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.WideStrUtils.pas System.WideStrUtils.hpp |
System.WideStrUtils | System.WideStrUtils |
説明
PWideChar を新たに割り当てたヒープにコピーし、新しい PWideChar を返します。
WStrNew は Str のコピーをヒープ上に割り当てます。
Str が nil (Delphi)や NULL (C++)または空の文字列へのポインタである場合は、WStrNew は新しい空の PWideChar へのポインタを返します。
該当しない場合は、WStrNew は Str を複製します。つまり WStrAlloc への呼び出しにより領域が確保され、複製された PWideChar へのポインタが返ります。
割り当て領域は Str * 2 + 5 バイトの長さです。