Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //char szTestString[] = "tesing/myname_junk";
- class CharacterCustomizationAsset :
- public fb::Asset
- {
- public:
- UIHudIcon m_uIHudIcon;//
- fb::String m_uIKitIconName;
- fb::String m_labelSid;
- __forceinline char *GetName()
- {
- static char szName[20] = {0};
- bool asdf = false;
- bool Slash = false;
- const char *name = this->m_name.m_chars;
- if( name )
- {
- for( int i = 0, j = 0; i < (int)strlen(name); i++ )
- {
- if( asdf && name[i] == '_' )
- {
- szName[j] = 0;
- break;
- }
- if( name[i] == '/' && !asdf )
- {
- if(!Slash)
- {
- Slash = true;
- continue;
- }
- asdf = true;
- continue;
- }
- if( asdf )
- {
- szName[j] = name[i+2];
- j++;
- }
- }
- }
- return szName;
- }
- __forceinline char* GetName1()
- {
- static char szName[20] = {0};
- const char* name = this->m_name.m_chars;
- name = strstr(name, "/") + 1;
- strcpy_s(szName, 20, name);
- memset(strstr(szName, "_"), 0, 1);
- return (char*)szName;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement