I want to remove the character '$' and substring "%%&&**" from an input string S. The substring can occur many times within S. I need to use a function that can split S into 2 substring Sleft and Sright, then call this function from main function to remove the substring and concatenate the Sleft and Sright into a new string call S2.
Please help me!