src/bencoding.cpp
const BencEntity *BencodedDict::Get(const char* key, int len) const
{
	assert(bencType == BENC_DICT);
	assert(dict);
	BencKey Key( (unsigned char *) key, len < 0 ? (int)strlen(key) : len);
	BencodedEntityMap::const_iterator it = dict->find( Key );
	if( it == dict->end() )
		return NULL;
	else
		return &(it->second);
}
// lookup function.  Returns NULL if the key is not found.
// The returned pointer is not a copy.  Do not deallocate it.
lookup function.  Returns NULL if the key is not found.
The returned pointer is not a copy.  Do not deallocate it.
lookup function . Returns NULL if the key is not found . The returned pointer is not a copy . Do not deallocate it .
const BencEntity *BencodedDict::Get(const char* key, int len) const
{
	assert(bencType == BENC_DICT);
	assert(dict);
	BencKey Key( (unsigned char *) key, len < 0 ? (int)strlen(key) : len);
	BencodedEntityMap::const_iterator it = dict->find( Key );
	if( it == dict->end() )
		return NULL;
	else
		return &(it->second);
}
const BencEntity * BencodedDict :: Get ( const char * key , int len ) const { assert ( bencType == BENC_DICT ) ; assert ( dict ) ; BencKey Key ( ( unsigned char * ) key , len < 0 ? ( int ) strlen ( key ) : len ) ; BencodedEntityMap :: const_iterator it = dict -> find ( Key ) ; if ( it == dict -> end ( ) ) return NULL ; else return & ( it -> second ) ; }
lookup function.
lookup function .