#56. 字符串子串不重叠移除(不区分大小写)
字符串子串不重叠移除(不区分大小写)
String Substring Removal
Background
[No specific background provided in original problem]
Problem Description
Given two strings, base and remove, return a version of the base string where all instances of the remove string have been removed (not case sensitive). You may assume that the remove string is length or more. Remove only non-overlapping instances, so with "xxx" removing "xx" leaves "x".
Input Format
The input consists of a single line containing two strings, base and remove, separated by a space.
baseremove
Output Format
Output a single line containing the processed string, enclosed in double quotes ".
"processed_string"
Sample
Hello there llo
"He there"
Hello there e
"Hllo thr"
Hello there x
"Hello there"
Sample Explanation
Sample 1: Removing "llo" (case-insensitive) from "Hello there" results in "He there". Sample 2: Removing "e" (case-insensitive) from "Hello there" results in "Hllo thr". Sample 3: Removing "x" (case-insensitive) from "Hello there" results in "Hello there" as "x" is not found.
Constraints
Time limit: second, Memory limit: KiB for each test case.