UKismetStringLibrary::BuildString_Bool
#include "Kismet/KismetStringLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Builds a new string in the form AppendTo+Prefix+InBool+Suffix, rendering the boolean as the literal word 'true' or 'false' between the given prefix and suffix.
Caveats & Gotchas
- • The boolean always renders as lowercase 'true'/'false' with no option for custom labels (e.g. 'Yes'/'No') — build the string manually with a Select node if different wording is needed.
- • Like the other BuildString_ variants, AppendTo is read, not mutated; the function always returns a new FString.
Signature
static FString BuildString_Bool(const FString& AppendTo, const FString& Prefix, bool InBool, const FString& Suffix) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| AppendTo | const FString& | An existing string to use as the start of the result. | — |
| Prefix | const FString& | A string inserted after AppendTo and before the formatted value. | — |
| InBool | bool | The boolean value to format and insert; renders as 'true' or 'false'. | — |
| Suffix | const FString& | A string appended to the end of the result. | — |
Return Type
FString Example
Build a debug flag readout C++
FString FlagText = UKismetStringLibrary::BuildString_Bool(TEXT(""), TEXT("IsAlive: "), true, TEXT(""));
// FlagText == "IsAlive: true" Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?