C++
AcString substr( Adesk::Int32 nStart, Adesk::Int32 nNumChars ) const;
Description
Get a substring from the string. (The functionality is the same as the mid() method.)
Parameters
Parameters | Description |
---|---|
nStart | Input zero-based index from the start of the string. |
nNumChars | Input number of characters to retrieve. If nNumChars is -1, then return the rest of the string. |
Returns
An AcString object consisting of the specified substring.
Remarks
Negative nStart is treated as 0.
Links
Previous Declaration
AutoCAD 2024 and earlier
ACBASE_PORT AcString substr(int nStart, int nNumChars) const;
History
AutoCAD 2025
nStart and nNumChars arguments now expect an Adesk::Int32 instead of int.