MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetDirectoryName

Method GetDirectoryName

Source/Engine/Platform/Base/StringUtilsBase.cpp:317–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317StringView StringUtils::GetDirectoryName(const StringView& path)
318{
319 const int32 lastFrontSlash = path.FindLast('\\');
320 const int32 lastBackSlash = path.FindLast('/');
321 const int32 splitIndex = Math::Max(lastBackSlash, lastFrontSlash);
322 return splitIndex != INVALID_INDEX ? path.Left(splitIndex) : StringView::Empty;
323}
324
325StringView StringUtils::GetFileName(const StringView& path)
326{

Callers 15

LoadMethod · 0.80
NewProjectMethod · 0.80
OpenProjectMethod · 0.80
CreateImportPathUIMethod · 0.80
IsValidAssetNameMethod · 0.80
MoveMethod · 0.80
GetXmlDocsMethod · 0.80
ModifyResultFilenameMethod · 0.80
ImportMethod · 0.80
ImportMethod · 0.80

Calls 3

LeftMethod · 0.80
MaxFunction · 0.50
FindLastMethod · 0.45

Tested by

no test coverage detected