handle empty substrings correctly
Merge pull request #30 from davidchambers/empty-substring

handle empty substrings correctly