Exposed ToLower() and ToUpper() string functions to ZScript

https://forum.zdoom.org/viewtopic.php?t=57515
This commit is contained in:
alexey.lysiuk 2017-08-07 15:24:18 +03:00
parent 04be9fe6f2
commit 33beca6e6f
2 changed files with 15 additions and 0 deletions

View file

@ -1267,3 +1267,16 @@ DEFINE_ACTION_FUNCTION(FStringStruct, LastIndexOf)
ACTION_RETURN_INT(self->LastIndexOf(substr)); ACTION_RETURN_INT(self->LastIndexOf(substr));
} }
DEFINE_ACTION_FUNCTION(FStringStruct, ToUpper)
{
PARAM_SELF_STRUCT_PROLOGUE(FString);
self->ToUpper();
return 0;
}
DEFINE_ACTION_FUNCTION(FStringStruct, ToLower)
{
PARAM_SELF_STRUCT_PROLOGUE(FString);
self->ToLower();
return 0;
}

View file

@ -658,6 +658,8 @@ struct StringStruct native
native String Filter(); native String Filter();
native int IndexOf(String substr, int startIndex = 0) const; native int IndexOf(String substr, int startIndex = 0) const;
native int LastIndexOf(String substr) const; native int LastIndexOf(String substr) const;
native void ToUpper();
native void ToLower();
} }
class SectorEffect : Thinker native class SectorEffect : Thinker native