Share

AcString::deleteAtIndex

C++

Adesk::Int32 deleteAtIndex(
    Adesk::Int32 iIndex, 
    Adesk::Int32 nCount = 1
);

Description

Deletes character(s) from a string starting with the character at the given index.

Parameters

Parameters Description
iIndex Input zero-based position from which to start deleting.
nCount Input number of characters to be deleted. If -1, delete to end.

Returns

Length of the changed string.

Remarks

Truncates the string if nCount is negative.

No change to string if

  • nCount is 0.
  • iIndex is invalid.

Links

AcString

Previous Declaration

AutoCAD 2017 through AutoCAD 2024

ACBASE_PORT int deleteAtIndex(int iIndex, int nCount = 1);

History

AutoCAD 2025

Function now returns Adesk::Int32 instead of int, and the iIndex and nCount arguments now take Adesk::Int32 values instead of int.

Was this information helpful?