change str_remaining() to get the last occurance of $part_before,
add test to demonstrate behaviour