MCPcopy Create free account
hub / github.com/davisking/dlib / get_basename

Method get_basename

dlib/http_client/http_client.cpp:257–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255// ----------------------------------------------------------------------------------------
256
257 std::string http_client::get_basename( const std::string& filename ) const
258 {
259 std::string::size_type pos = filename.find_last_of("\\/");
260 if ( pos == std::string::npos )
261 return filename;
262 else
263 return filename.substr(pos+1);
264 }
265
266// ----------------------------------------------------------------------------------------
267

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected