Skip to main content
Solved

How to reverse character order in a string using FME?

  • Mar 28, 2019 3:47 PM UTC
  • 2 replies
  • 234 views

mwoj
Contributor
Forum|alt.badge.img+1

I would like to reverse character order in the string e.g. from "Mariusz 123 #$" to "$# 321 zsuiraM". Do you know any FME function or transformer to perform this? I do not know Pyton.

Best answer by ebygomm

Use the string searcher to get every character as a list element, sort the list by startIndex in reverse order, then concatenate the list

 

reverse_string.fmw

 

Or if you did want to use a pythoncaller

View original
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Evangelist
Forum|alt.badge.img+54
  • Evangelist
  • Best Answer
  • Mar 28, 2019 4:15 PM UTC

Use the string searcher to get every character as a list element, sort the list by startIndex in reverse order, then concatenate the list

 

reverse_string.fmw

 

Or if you did want to use a pythoncaller


mwoj
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • Mar 28, 2019 7:04 PM UTC

@egomm Thank you.