Share

AcString::findLast

C++

Adesk::Int32 findLast(
    const ACHAR * pwsz, 
    Adesk::Int32 nEndPos = -1
) const;

Description

Finds the last occurrence of a substring in the string.

Parameters

Parameters Description
pwsz Input substring to search for
nEndPos Input last character position to look at, -1 to start at end of string

Returns

Position in which the substring was found, else -1.

Note: If pwsz is an nullptr or empty string, string length is returned.

Links

AcString

Previous Declaration

AutoCAD 2020 through 2024

ACBASE_PORT int findLast(const ACHAR *psz, int nEndPos = -1) const;

History

AutoCAD 2025

Function now returns Adesk::Int32 instead of int, and the nEndPos argument now takes an Adesk::Int32 value instead of int.

Was this information helpful?