Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FPathViews
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FStringView GetExtension
(
const FStringView& InPath, |
Returns the portion of the path after the last dot following the last separator, optionally including the dot, optionally allowing compound extensions. | Misc/PathViews.h | |
static FStringView GetExtension
(
const FStringView& InPath, |
Legacy version of GetExtension that uses a bool to specify bIncludeDot. | Misc/PathViews.h |
GetExtension(const FStringView &, UE::Paths::EFlags)
Description
Returns the portion of the path after the last dot following the last separator, optionally including the dot, optionally allowing compound extensions.
Examples: (Using '/' but '\' is valid too.) "A/B.C.D" -> "D" (EFlags::IncludeDot == 0, EFlags::AllowCompoundExtension == 0) -> ".D" (EFlags::IncludeDot == 1, EFlags::AllowCompoundExtension == 0) -> "C.D" (EFlags::IncludeDot == 0, EFlags::AllowCompoundExtension == 1) -> ".C.D" (EFlags::IncludeDot == 1, EFlags::AllowCompoundExtension == 1) "A/B/C.D" -> "D" (EFlags::IncludeDot == 0) or ".D" (EFlags::IncludeDot == 1) "A/B/.D" -> "D" (EFlags::IncludeDot == 0) or ".D" (EFlags::IncludeDot == 1) ".D" -> "D" (EFlags::IncludeDot == 0) or ".D" (EFlags::IncludeDot == 1) "A/B/C" -> "" "A.B/C" -> "" "A.B/" -> "" "A" -> "" "A.B/C.D" -> "D" (EFlags::IncludeDot) or ".D" (EFlags::IncludeDot), even if EFlags::AllowCompoundExtension == 1.
Default: Dot is not included, compound extensions are not allowed.
| Name | GetExtension |
| 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 FStringView GetExtension
(
const FStringView & InPath,
UE::Paths::EFlags Flags
)
The portion of the path after the last dot following the last separator, optionally including the dot.
Parameters
| Name | Remarks |
|---|---|
| Flags | EFlags::IncludeDot Includes the leading dot in the result. EFlags::AllowCompoundExtension Allows compound extensions (.a.b) in the result. |
GetExtension(const FStringView &, bool)
Description
Legacy version of GetExtension that uses a bool to specify bIncludeDot. EFlags::AllowCompoundExtension == 0.
| Name | GetExtension |
| 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 FStringView GetExtension
(
const FStringView & InPath,
bool bIncludeDot
)