UBlueprintPathsLibrary::Split
#include "Kismet/BlueprintPathsLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Breaks a filename or path into its directory, base filename, and extension components in a single call.
Caveats & Gotchas
- • All three outputs are reference parameters — in Blueprint this is one node with three output pins, not a returned struct.
- • ExtensionPart is returned without the leading dot, unlike GetExtension(bIncludeDot=true) which can include it.
- • For a path with multiple dots (e.g. "Archive.tar.gz"), only the final extension is split off; the rest stays part of FilenamePart.
Signature
static ENGINE_API void Split(const FString& InPath, FString& PathPart, FString& FilenamePart, FString& ExtensionPart); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InPath | const FString& | Fully qualified or relative path to parse. | — |
| PathPart | FString& | Receives the directory portion of InPath. | — |
| FilenamePart | FString& | Receives the filename portion, without extension. | — |
| ExtensionPart | FString& | Receives the extension, without the leading dot. | — |
Return Type
void Example
Break a save path into its components C++
FString PathPart, FilenamePart, ExtensionPart;
UBlueprintPathsLibrary::Split(TEXT("Saved/SaveGames/Slot1.sav"), PathPart, FilenamePart, ExtensionPart);
// PathPart == "Saved/SaveGames", FilenamePart == "Slot1", ExtensionPart == "sav" See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?