String manipulation question

nate100

Member
I need an easy way to get the string.
Say if I have the possible string values
1) 1
2) 1.10
3) 1.10.6

what I need the program to do is to get me the value after the last "." the the values before the last "." . If "." is not there as in 1) it will simplyu return that value. Example for 1) it would return 1.

For 2) it will return 10 for after the last "." and 1 before the last "."
for 3) it will return 6 after the last "." and 1.10 before the last "."

Thank you.
 

MrMoo

Member
Look into R-Index.
It will return the position from the right of the index of the string (in this case ".") you are searching for, then use substring to capture what's before and after it.
 

TomBascom

Curmudgeon
You have a "."delimited string. I would use a combination of NUM-ENTRIES() and ENTRY(). Those functions are very handy when dealing with delimited strings.
 
Top