How to echo all the_title() without text after last “-“

This is really a PHP question not so much a WP question — but:

echo substr($stringx,0,strrpos($stringx,'-'));

Also I think your example #3 is wrong unless there are some cases where you want to exclude more than simply after the final dash character.

Note – if you want to exclude both that final blank space along with the final dash that immediately follows it, then change the substr length by -1 to avoid the final blank space:

echo substr($stringx,0,strrpos($stringx,'-')-1);