FString::ToLower
#include "Containers/UnrealString.h"
Access: public
Specifiers: const
Description
Returns a new FString with all characters converted to lowercase. Does not modify the original string.
Signature
[[nodiscard]] FString ToLower() const & Return Type
FString Caveats & Gotchas
- • Returns a new string; does not modify the original. Use ToLowerInline() for in-place modification to avoid a heap allocation.
- • Uses simple ASCII/UCS2 lowercasing — not full Unicode case folding. Unsuitable for locale-sensitive operations (e.g., Turkish dotless-i).
- • The rvalue overload (ToLower() &&) moves internal storage automatically when the source is a temporary.
Example
Case-normalise before comparison C++
FString Input = TEXT("Hello World");
FString Lower = Input.ToLower(); // "hello world"
// In-place (no allocation):
Input.ToLowerInline(); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?