求一种去掉字符串中空格以及无效字符的程序
The input is two strings(A and B) and a integer(k).You should write a function to accomplish the following functions.
1、Insert B into A, the integer k is the position of the B.
Example: A is "World", B is "Hello", k=0, the result is "HelloWorld"
2、if k < 0 or k > strlen(A), print "illegal index"
3、The length of A is less then 2000, the length of B is less than 1000.
Sample Input:
world hello 0
Sample Output:
helloworld
Sample Input:
world hello 10
Sample Output:
illegal index
Sample Input:
helld oworl 4
Sample Output:
helloworld