- added Unicode aware MakeUpper/MakeLower functions to FString and ZScript's String and deprecated ToUpper/ToLower because their semantics did not allow fixing them.
This commit is contained in:
parent
325b744f4a
commit
f7561f25d6
4 changed files with 50 additions and 16 deletions
|
|
@ -263,6 +263,28 @@ DEFINE_ACTION_FUNCTION_NATIVE(FStringStruct, ToLower, StringToLower)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void StringMakeUpper(FString *self, FString *out)
|
||||
{
|
||||
*out = self->MakeUpper();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(FStringStruct, MakeUpper, StringMakeUpper)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FString);
|
||||
ACTION_RETURN_STRING(self->MakeUpper());
|
||||
}
|
||||
|
||||
static void StringMakeLower(FString *self, FString *out)
|
||||
{
|
||||
*out = self->MakeLower();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(FStringStruct, MakeLower, StringMakeLower)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FString);
|
||||
ACTION_RETURN_STRING(self->MakeLower());
|
||||
}
|
||||
|
||||
static int StringToInt(FString *self, int base)
|
||||
{
|
||||
return (int)self->ToLong(base);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue