This is one of those problems, where theres a simple task, yet the operation in the opposite direction just doesn't seem to be as easy.
It's simple to find a character at a specific position within a string: string.charAt(index)
I'm imagining, that it should be just as simple to replace a character at a specific position in said string with another character, but I can't for the life of me find a simple solution. The best I can come up with is to dissect the whole string into single chars, replace one and then join everything together again. But this seems very inelegant.
Basically I'm looking for the PImage.set(x,y,color) equivalent for Strings. Something like string.replace(index, char). Is this possible?
Any pointers are appreciated!
1