16std::string
make_safe_name(
const std::string &name, [[maybe_unused]]
bool allow_unicode)
18#if PXR_VERSION >= 2403
20 return pxr::TfMakeValidIdentifier(name);
28 buf.resize(name.size());
32 for (
auto cp : pxr::TfUtf8CodePointView{name}) {
33 constexpr pxr::TfUtf8CodePoint cp_underscore = pxr::TfUtf8CodePointFromAscii(
'_');
34 const bool cp_allowed = first ? (cp == cp_underscore || pxr::TfIsUtf8CodePointXidStart(cp)) :
35 pxr::TfIsUtf8CodePointXidContinue(cp);
50 return pxr::TfMakeValidIdentifier(name);