mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
Exposed String.Remove() function to ZScript
https://forum.zdoom.org/viewtopic.php?t=58402
This commit is contained in:
parent
285834ae5b
commit
5d83ee5e89
2 changed files with 10 additions and 0 deletions
|
@ -1225,6 +1225,15 @@ DEFINE_ACTION_FUNCTION(FStringStruct, Truncate)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FStringStruct, Remove)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FString);
|
||||
PARAM_UINT(index);
|
||||
PARAM_UINT(remlen);
|
||||
self->Remove(index, remlen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// CharAt and CharCodeAt is how JS does it, and JS is similar here in that it doesn't have char type as int.
|
||||
DEFINE_ACTION_FUNCTION(FStringStruct, CharAt)
|
||||
{
|
||||
|
|
|
@ -684,6 +684,7 @@ struct StringStruct native
|
|||
native String Left(int len) const;
|
||||
native String Mid(int pos = 0, int len = 2147483647) const;
|
||||
native void Truncate(int newlen);
|
||||
native void Remove(int index, int remlen);
|
||||
native String CharAt(int pos) const;
|
||||
native int CharCodeAt(int pos) const;
|
||||
native String Filter();
|
||||
|
|
Loading…
Reference in a new issue