Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FPathViews
Description
Splits a path into three parts, any of which may be empty: the path, the clean name, and the extension.
Examples: (Using '/' but '' is valid too.) "A/B/C.D" -> ("A/B", "C", "D") "A/B/C" -> ("A/B", "C", "") "A/B/" -> ("A/B", "", "") "A/B/.D" -> ("A/B", "", "D") "A/B.C.D" -> ("A", "B.C", "D") "A" -> ("", "A", "") "A.D" -> ("", "A", "D") ".D" -> ("", "", "D")
| Name | Split |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/PathViews.h |
| Include Path | #include "Misc/PathViews.h" |
| Source | /Engine/Source/Runtime/Core/Private/Misc/PathViews.cpp |
static void Split
(
const FStringView & InPath,
FStringView & OutPath,
FStringView & OutName,
FStringView & OutExt
)
Parameters
| Name | Remarks |
|---|---|
| OutPath | [out] Receives the path portion of the input string, excluding the trailing separator. |
| OutName | [out] Receives the name portion of the input string. |
| OutExt | [out] Receives the extension portion of the input string, excluding the dot. |