Say that string s is a substring of string t if s is found inside t, without any gaps. For example, "rack" is a substring of "cracker".

Write a definition of a function isSubtring(s, t) that produces true if s is a substring of t. So isSubstring("zoo", "zoology") = true, but isSubstring("ogy", "zoology") = false.

(Hint. Use recursion. Here are some ideas.

Note. You will want to use isPrefix. Just write the definition of isSubstring. For this problem, the definition of isPrefix is automatically supplied for you.

 

    [Language: Cinnameg  Kind: function definition*]

(*You can define more than one function if you put a semicolon between definitions (but not between cases of one definition). Be sure to define a function before you use it.)