UKismetStringLibrary::EndsWith
#include "Kismet/KismetStringLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Tests whether a string ends with the given suffix. Commonly used to check file extensions or naming suffixes like "_C" on Blueprint classes.
Caveats & Gotchas
- • Like StartsWith, the SearchCase parameter is not exposed to Blueprint, so BP graphs always compare case-insensitively.
- • An empty InSuffix always returns true.
Signature
static bool EndsWith(const FString& SourceString, const FString& InSuffix, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| SourceString | const FString& | The string to test. | — |
| InSuffix | const FString& | The suffix to look for. | — |
| SearchCase | ESearchCase::Type | Whether the comparison is case-sensitive. | ESearchCase::IgnoreCase |
Return Type
bool Example
Check a file extension C++
if (UKismetStringLibrary::EndsWith(FileName, TEXT(".uasset")))
{
// FileName is a uasset file
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?