I have a need/desire to replace string characters at specific locations. I cannot use the replacement functions I have found so far because they are based on character rather than location. Further, the character I want to replace may appear more than once in a string and I want to replace only a specific instance of that character. I may not “know” what the current character is, though I think I can go through a number of program steps to find it. All in all, a function that says “replace the block of characters beginning at character N and with length L with the specified replacement block”.woluld be perfect. Is there something I have overlooked that will do something like this? I do understand that encodings make this challenging but I go to great lengths to (try to) insure that everything is ASCII or compatible with ASCII.
Lament: it is dead easy in C since strings are, themselves. arrays and you only need an index to access, replace, whatever, any character.
Many thanks - Jim Wagner, Oregon Research Electronics