MCPcopy Create free account
hub / github.com/PixarAnimationStudios/OpenUSD / TfGetPathName

Function TfGetPathName

pxr/base/tf/stringUtils.cpp:334–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334string
335TfGetPathName(const string& fileName)
336{
337#if defined(ARCH_OS_WINDOWS)
338 size_t i = fileName.find_last_of("\\/:");
339#else
340 size_t i = fileName.rfind("/");
341#endif
342 if (i == string::npos) // no / in name
343 return "";
344 else
345 return fileName.substr(0, i+1);
346}
347
348string
349TfStringTrimRight(const string& s, const char* trimChars)

Callers 15

_FetchFileFunction · 0.85
mainFunction · 0.85
RemapMethod · 0.85
_ProcessAssetPathMethod · 0.85
_GetTemplatedClipsMethod · 0.85

Calls 1

rfindMethod · 0.80

Tested by 12

mainFunction · 0.68
SetupPluginsFunction · 0.68
SetupPluginsFunction · 0.68
_SetupTestPluginsFunction · 0.68
TestStringsFunction · 0.68
Test_TfDlFunction · 0.68