Altimetrik Interview Question

How to remove empty space from locator's text