- Added "const" qualifiers to the new UTF-8-aware string methods

This commit is contained in:
Player701 2019-04-13 22:18:47 +03:00 committed by Christoph Oelckers
parent 747906730c
commit 8ab6747d77
3 changed files with 8 additions and 8 deletions

View file

@ -681,7 +681,7 @@ void FString::ToLower ()
UnlockBuffer(); UnlockBuffer();
} }
FString FString::MakeLower() FString FString::MakeLower() const
{ {
TArray<uint8_t> builder(Len()); TArray<uint8_t> builder(Len());
int pos = 0; int pos = 0;
@ -694,7 +694,7 @@ FString FString::MakeLower()
return FString(builder); return FString(builder);
} }
FString FString::MakeUpper() FString FString::MakeUpper() const
{ {
TArray<uint8_t> builder(Len()); TArray<uint8_t> builder(Len());
int pos = 0; int pos = 0;

View file

@ -238,8 +238,8 @@ public:
void ToUpper (); void ToUpper ();
void ToLower (); void ToLower ();
FString MakeUpper(); FString MakeUpper() const;
FString MakeLower(); FString MakeLower() const;
void StripLeft (); void StripLeft ();
void StripLeft (const FString &charset); void StripLeft (const FString &charset);

View file

@ -909,8 +909,8 @@ struct StringStruct native
native int RightIndexOf(String substr, int endIndex = 2147483647) const; native int RightIndexOf(String substr, int endIndex = 2147483647) const;
deprecated("4.1") native void ToUpper(); deprecated("4.1") native void ToUpper();
deprecated("4.1") native void ToLower(); deprecated("4.1") native void ToLower();
native String MakeUpper(); native String MakeUpper() const;
native String MakeLower(); native String MakeLower() const;
native static int CharUpper(int ch); native static int CharUpper(int ch);
native static int CharLower(int ch); native static int CharLower(int ch);
native int ToInt(int base = 0) const; native int ToInt(int base = 0) const;
@ -918,8 +918,8 @@ struct StringStruct native
native void Split(out Array<String> tokens, String delimiter, EmptyTokenType keepEmpty = TOK_KEEPEMPTY) const; native void Split(out Array<String> tokens, String delimiter, EmptyTokenType keepEmpty = TOK_KEEPEMPTY) const;
native void AppendCharacter(int c); native void AppendCharacter(int c);
native void DeleteLastCharacter(); native void DeleteLastCharacter();
native int CodePointCount(); native int CodePointCount() const;
native int, int GetNextCodePoint(int position); native int, int GetNextCodePoint(int position) const;
} }
class SectorEffect : Thinker native class SectorEffect : Thinker native