Share

AcString::substr

C++

AcString substr(
    Adesk::Int32 numChars
) const;

Description

Gets a substring from the start of the string.

Parameters

Parameters Description
numChars Input number of characters to retrieve. If nNumChars is -1, then return the entire string.

Returns

An AcString object consisting of the specified substring.

Remarks

Negative numChars is treated as -1 and returns a copy of the string.

Links

AcString

Previous Declaration

AutoCAD 2024 and earlier

AcString substr(int numChars) const;

inline AcString AcString::substr(int nNumChars) const;

History

AutoCAD 2025

nNumChars argument now expects an Adesk::Int32 instead of int.

Was this information helpful?