Extended String.LastIndexOf() with endIndex parameter

https://forum.zdoom.org/viewtopic.php?t=57326
This commit is contained in:
alexey.lysiuk 2017-11-01 15:24:05 +02:00
parent 037bb1408b
commit 62e91b23bd
2 changed files with 3 additions and 2 deletions

View file

@ -1264,7 +1264,8 @@ DEFINE_ACTION_FUNCTION(FStringStruct, LastIndexOf)
{
PARAM_SELF_STRUCT_PROLOGUE(FString);
PARAM_STRING(substr);
ACTION_RETURN_INT(self->LastIndexOf(substr));
PARAM_INT_DEF(endIndex);
ACTION_RETURN_INT(self->LastIndexOf(substr, endIndex));
}
DEFINE_ACTION_FUNCTION(FStringStruct, ToUpper)

View file

@ -688,7 +688,7 @@ struct StringStruct native
native int CharCodeAt(int pos) const;
native String Filter();
native int IndexOf(String substr, int startIndex = 0) const;
native int LastIndexOf(String substr) const;
native int LastIndexOf(String substr, int endIndex = 2147483647) const;
native void ToUpper();
native void ToLower();
native int ToInt(int base = 0) const;