#295. startWord
startWord
Background
Description
Given a string and a second "word" string, we'll say that the word matches the string if it appears at the front of the string, except its first char does not need to match exactly. On a match, return the front of the string, or otherwise return the empty string. So, so with the string "hippo" the word "hi" returns "hi" and "xip" returns "hip". The word will be at least length 1.
Format
Input
Output
Samples
hippo" "hi
"hi"
hippo" "xip
"hip"
hippo" "i
"h"
Limitation
1s, 1024KiB for each test case.