mid function

Scotte Meredith spomacguy at gmail.com
Mon Apr 18 17:19:07 UTC 2022


The rpos() function will get you the position of a string beginning on the right of the string instead of the left, as pos() does. You can use this within mid() to get something like you are looking for.

Something like mid(string,1,rpos('list',string)-1)

For string = 'abclist', this would return 'abc'


> On Apr 18, 2022, at 9:41 AM, Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
> 
> Hi all,
> The mid function returns a substring of a specified length starting a specific position from a larger string.Is there a way to use a function to start from the end of string then count backwards?I am thinking of strings with suffixes with different lengths and I want to $sendallref all strings ending with say "list".Something like mid($sendallref.lColsName,0,-4))Rgds, Martin.
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



Scotte Meredith
spomacguy at gmail.com
509/998-0991






More information about the omnisdev-en mailing list