I am trying to create a function that builds a string made up of the characters of two given strings.
The function has 3 arguments:
searchString- a String that is scanned character by character to identify the position ofnewCharacteroriginalString- a string the same length as searchStringnewCharacter- a 1 character string.
The function should return a new string that contains newCharacter in the same positions as in searchString otherwise the characters at the corresponding positions of the originalString.
Example:
searchString = data,
originalString = bcde
newCharacter = a
The function would return "bada".
targetString? Another argument?