firstHalf: the front half of a string

Given a string of even length, return the first half. So "WooHoo" gives "Woo". Step through firstHalf: str.length()/2 is the index where the second half begins, and substring(0, …) stops just before it.