Share

AcString::setAt

C++

AcString& setAt(
    Adesk::Int32 nIndex, 
    ACHAR ch
);

Description

Sets the character at the given position to the specified character.

Parameters

Parameters Description
nIndex Input zero-based index position where to replace a character in the string
ch Input the new character which should replace the old character

Returns

A reference to this string object.

Remarks

If nIndex is out of range, string is not modified.

If ch is 0 and nIndex is valid, this will truncate the string.

Note: This method will never increase the string length.

Links

AcString

Previous Declaration

AutoCAD 2017 through AutoCAD 2024

ACBASE_PORT AcString& setAt(int nIndex, ACHAR ch);

History

AutoCAD 2025

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

Was this information helpful?