I assume Civi trims whitespace on both sides of first name and last name before saving into the database. Are you saying if there is a space before and after names dedupe rule doesn't work? If so than its a core bug.
Have just created a PR for the fix.
If you saying the first name entered is 'Pradeep k' with a space between two words than i don't think its handled in Civi at the moment. You may need to ask someone to have this feature available in Civi or contribute code if you are developer. Or you can create an extension and handle the above scenario by implementing hook_civicrm_findDuplicates or hook_civicrm_dupeQuery hooks.
Thanks
Pradeep