How do I generate all possible substrings of a string?
What are the approaches suitable to generate all substrings of a given string?