if true the item ' str ' is in ' list2'
if ( list2 [ mid ] . name . compare ( str ) == 0 ) return list2 [ mid ] . price ; else if ( list2 [ mid ] . name . compare ( str ) < 0 ) low = mid + 1 ; else high = mid - 1 ; }