How to find the offset of the last instance of a repeating character in a string?
Mark Wieder
ahsoftware at sonic.net
Mon Oct 29 18:32:52 EDT 2018
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.
function rightmostSlashOf pText
set the itemdelimiter to "/"
return offset(item -1 of pText, pText)
end rightmostSlashOf
--
Mark Wieder
ahsoftware at gmail.com
More information about the use-livecode
mailing list