LastIndexOf starting index

Moderator: GZDoom Developers

Post Reply
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

LastIndexOf starting index

Post by Major Cooke »

When looking at other functions from similar languages like JavaScript, I noticed they have the ability to specify how far backwards they should start, akin to IndexOf's parameter to start forward. There's even a wrapper added to also deal with that.

Code: Select all

long FString::LastIndexOf (const FString &substr, long endIndex) const
{
	return LastIndexOf (substr.Chars, endIndex, substr.Len());
}
Can this be added as well?
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: LastIndexOf starting index

Post by _mental_ »

Added in 62e91b2.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”