get upper or lower case of a string str, based on the numeric option.
if option === 0, then no change is made