Switch from startsWith to indexOf(...)==0