#295. 字符串前缀匹配(首字符可不同)
字符串前缀匹配(首字符可不同)
Prefix Match with Flexible First Character
Background
Congcong is currently learning about string processing and has encountered an interesting problem that requires your help to solve.
Problem Description
Given a main string and a "word" string , we'll say that matches if it appears at the front of , except its first character does not need to match exactly. On a match, return the front of (with the same length as ), or otherwise return the empty string. The word will be at least length .
For example, with the string $S = ext{"hippo\