C++
AcString( const char * psz, Encoding encoding, Adesk::UInt32 nByteCount );
Description
Constructs a string and initializes it from a narrow char string.
Parameters
Parameters | Description |
---|---|
psz | Input narrow string. Null terminated |
encoding | Input string's encoding format |
nByteCount | Number of input bytes from psz to use |
Remarks
Currently, only Utf8 encoding is supported.
psz is not required to be null terminated.
If nByteCount causes last multi-byte utf8 char in psz to be truncated, then the behavior is undefined.
This can be used to construct from std::string_view.
Links
Previous Declaration
AutoCAD 2020 through AutoCAD 2024
ACBASE_PORT AcString(const char *psz, Encoding encoding, unsigned int nByteCount);
History
AutoCAD 2025
nByteCount argument changed from unsigned int to Adesk::UInt32.