Handles substrings.