I can do this with String.replace():
String line= "Mary had a little lamb.";
line= line.replace('a','x');
But I want to do these things:
String line= "Mary had a little lamb.";
line= line.replace([period character],'x');
String line= "Mary had a little lamb.";
line= line.replace([carriage return],[comma]);
I want to use .replace with punctuation marks and invisible characters. But the compiler freaks out whenever I attempt this. I strongly suspect that ascii or unicode values are somehow involved in this. Can you tell me the specific syntax that I need to use.
String line= "Mary had a little lamb.";
line= line.replace('a','x');
But I want to do these things:
String line= "Mary had a little lamb.";
line= line.replace([period character],'x');
String line= "Mary had a little lamb.";
line= line.replace([carriage return],[comma]);
I want to use .replace with punctuation marks and invisible characters. But the compiler freaks out whenever I attempt this. I strongly suspect that ascii or unicode values are somehow involved in this. Can you tell me the specific syntax that I need to use.