How to find the offset of the last instance of a repeating character in a string?

Alex Tweedly alex at tweedly.net
Mon Oct 29 19:50:58 EDT 2018


On 29/10/2018 22:32, Mark Wieder via use-livecode wrote:
> On 10/29/2018 08:32 AM, Keith Clarke via use-livecode wrote:
>
>> I’m trying to separate paths & pages from a list of URLs and so 
>> looking to identify the position of the last ‘/‘ character.
>
How about ....
> function rightmostSlashOf p
>    set the itemdelimiter to "/"
>    return  (thenumberofcharsinp) - (thenumberofcharsinitem-1 ofp)
> end rightmostSlashOf
>




More information about the use-livecode mailing list