I understand trimming input fields is typically a useful default, but in this case this prevents me from searching for a space. So maybe it'd be worthwhile to add a `if (trim(str)=="") return str` exception or something similar?
oh right, good catch
oh right, good catch