MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / BufferToStdString

Function BufferToStdString

samples/shared/strtools.cpp:193–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void BufferToStdString( std::string & sDest, const char *pchBuffer, uint32_t unBufferLen )
194{
195 sDest.resize( unBufferLen + 1 );
196 memcpy( const_cast< char* >( sDest.c_str() ), pchBuffer, unBufferLen );
197 const_cast< char* >( sDest.c_str() )[ unBufferLen ] = '\0';
198}
199
200/** Returns a std::string from a uint64_t */
201std::string Uint64ToString( uint64_t ulValue )

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.80

Tested by

no test coverage detected