MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / from_wpath

Function from_wpath

OgreMain/src/OgreFileSystem.cpp:130–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128 return L"";
129 }
130 String from_wpath( const std::wstring &text, unsigned codepage = CP_UTF8 )
131 {
132 const int length =
133 ::WideCharToMultiByte( codepage, 0, text.c_str(), (int)text.size(), NULL, 0, NULL, NULL );
134 if( length > 0 )
135 {
136 String str;
137 str.resize( length );
138 if( 0 != ::WideCharToMultiByte( codepage, 0, text.c_str(), (int)text.size(), &str[0],
139 (int)str.size(), NULL, NULL ) )
140 {
141 return str;
142 }
143 }
144 return "";
145 }
146 FileSystemPath fileSystemPathFromString( const String &path )
147 {
148# ifdef _OGRE_FILESYSTEM_ARCHIVE_UNICODE

Callers 2

fileSystemPathToStringFunction · 0.85
findFilesMethod · 0.85

Calls 3

c_strMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected