BetaCodeShareBeta

by Code Solutions Project

Simple solutions for common problems

Java
JoseluCross
public String toRTF(String text){
	String middle = text
    middel = middle.replace("á", "\\'e1");
    middel = middel.replace("Á", "\\'c1");
    middel = middel.replace("é", "\\'e9");
    middel = middel.replace("É", "\\'c9");
    middel = middel.replace("í", "\\'ed");
    middel = middel.replace("Í", "\\'cd");
    middel = middel.replace("ó", "\\'f3");
    middel = middel.replace("Ó", "\\'d3");
    middel = middel.replace("ú", "\\'fa");
    middel = middel.replace("Ú", "\\'da");
    middel = middel.replace("ü", "\\'fc");
    middel = middel.replace("Ü", "\\'dc");
    middel = middel.replace("ñ", "\\'f1");
    middel = middel.replace("Ñ", "\\'d1");
    return middel;
}
Java
JoseluCross
public String toRTF(String text){
    String middle = text;
    middel = middle.replace("á", "\\'e1");
    middel = middel.replace("Á", "\\'c1");
    middel = middel.replace("é", "\\'e9");
    middel = middel.replace("É", "\\'c9");
    middel = middel.replace("í", "\\'ed");
    middel = middel.replace("Í", "\\'cd");
    middel = middel.replace("ó", "\\'f3");
    middel = middel.replace("Ó", "\\'d3");
    middel = middel.replace("ú", "\\'fa");
    middel = middel.replace("Ú", "\\'da");
    middel = middel.replace("ü", "\\'fc");
    middel = middel.replace("Ü", "\\'dc");
    middel = middel.replace("ñ", "\\'f1");
    middel = middel.replace("Ñ", "\\'d1");
    return middel;
}
×Oh snap! Something wrong