Probably easiest is creating a Java-action doing that for you, for instance using the Apache commons library
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
public String reverseUsingApacheCommons(String MyInput) {
return StringUtils.reverse(MyInput);
}
or if you want to stay independent:
public java.lang.String executeAction() throws Exception
{
// BEGIN USER CODE
char[] in = Parameter.toCharArray();
int begin=0;
int end=in.length-1;
char temp;
while(end>begin){
temp = in[begin];
in[begin]=in[end];
in[end] = temp;
end--;
begin++;
}
return new String(in);
// END USER CODE
}
but if you want to do this in Mendix: