单选题
下面函数的功能应该是:删除字符串str中所有与变量ch相同的字符,并返回删除后的结果。例如,若str=“ABCD-ABCD”,ch=“B”,则函数的返回值为“ACDACD”。
Function delchar(str As String,ch As String) As String
Dim k As Integer,tempAs String,ret As String
ret=""
For k=1 To Len(str)
temp=Mid(str,k,1)
If temp=ch Then
ret=ret & temp
End lf
Next k
delchar=ret
End Function
但实际上函数有错误,需要修改。下面的修改方案中正确的是______。