Hi,
i need a User-Function in Java for XI wich replace the following characters of a text for example:
ä in ae
ü in ue
ö in oe
can anyone tells me how the java has to look like?
hi,
you can use <b>fixvalues</b> standard function (from conversion functions)
and put this inside
Regards,
michal
This doesn't work when i have a Text for example:
"die häuser sind schön"
the result must be:
"die haeuser sind schoen"
Message was edited by:
Christian Maier
Hi Christian,
Then you need proper logic behind it.I will try your problem.If i successed i will post it.
Cheers!
Samarjit
Hi,
you need three diferent udf for this.
/*******UDF*******/
1.
if(a.equalsIgnoreCase("ä")){
a = "ae";
}
return(a);
2.
if(b.equalsIgnoreCase("ü"){
b="ue";
}
return(b);
3.
if(c.equalsIgnoreCase("ö"){
c="oe";
}
return(c);
Cheers!
Samarjit
Hi,
>>>>you need three diferent udf for this.
/*******UDF*******/
1.
if(a.equalsIgnoreCase("ä")){
a = "ae";
}
return(a);
1. not true - you can put everything in one
2. it's better to use standard function (fixed values) to do that
that's what standard fucntions are for
Regards,
michal
-
-
XI / PI FAQ - Frequently Asked Questions
Hi Michal,
We can not put in one.I mention that need three udf for this scenario.
Cheers!
Samarjit
hi,
>>>>We can not put in one.I mention that need three udf for this scenario.
trust me we can do multiple if statements in java
Regards,
michal
Hi,
>>>>trust me we can do multiple if statements in java
That time i do not know the exact logic.Now Dominic solved the purpose ![]()
Cheers!
Samarjit
> hi,
>
> >>>>We can not put in one.I mention that need three
> udf for this scenario.
>
> trust me we can do multiple if statements in java ![]()
>
>
> Regards,
> michal
hehe
Henrique.
Hi,
try this UDF:
String retString;
retString = a.replaceAll("ä", "ae");
retString = retString.replaceAll("ü", "ue");
retString = retString.replaceAll("ö", "oe");
return(retString);
this will replace any occurrence all "ä" , "ü" , "ö" in your text in "ae" , "ue" , "oe"
Regards,
Manuel
Or shorter:
String replace;
replace = a.replaceAll("ö", "oe").replaceAll("ä", "ae").replaceAll("ü", "ue");
return replace;
Regards
Dominic
Hi Dominic,
Thanks!
Cheers!
Samarjit
Hi Christian,
did this solve your problem?
If yes, please award points.
Dominic