add: API endsWith method