uutils: handle prefixes instead of suffixes