How to separate a string with a given delimiter.

0
Hi ,                 I  have a string some.sample@gmail.com, I want separate the string with the delimiter .(dot). Thanks in advance.
asked
2 answers
0

See the string function calls here: https://docs.mendix.com/refguide/string-function-calls#1-introduction

Use find to get the position of the dot and use substring to cut the string apart. See also the video in the introduction.

Regards,

Ronald

 

answered
0

You can use string functions  like this. First find the index of delimeter, then get substring from start to delimeter, or from the delimeter to the end. 

substring($string, 0, find($string, '.'))
OR
substring($string, find($string, '.'), length($string)-1)

If you have advanced usage, you can use the string utils functions from the community commons function library

https://appstore.home.mendix.com/link/app/170/

answered