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

Method GetFileName

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

Source from the content-addressed store, hash-verified

323}
324
325StringView StringUtils::GetFileName(const StringView& path)
326{
327 Char chr;
328 const int32 length = path.Length();
329 int32 num = length;
330 do
331 {
332 num--;
333 if (num < 0)
334 return path;
335 chr = path[num];
336 } while (chr != DirectorySeparatorChar && chr != AltDirectorySeparatorChar && chr != VolumeSeparatorChar);
337 return path.Substring(num + 1, length - num - 1);
338}
339
340StringView StringUtils::GetFileNameWithoutExtension(const StringView& path)
341{

Callers 15

RemoveModuleMethod · 0.80
ContentFolderMethod · 0.80
UpdatePathMethod · 0.80
ContentItemMethod · 0.80
UpdatePathMethod · 0.80
ItemNodeMethod · 0.80
OnRenamedMethod · 0.80
OnImportFileBeginMethod · 0.80
OnCreateButtonClickedMethod · 0.80
GenerateProjectMethod · 0.80
DeployFilesMethod · 0.80

Calls 2

SubstringMethod · 0.80
LengthMethod · 0.45

Tested by

no test coverage detected