While it would still be interesting for a generic solution…
I found one for this specific situation… turns out a previous variable already had the common string I need for this app…
you missed the point of the execise. In the original posting, I don’t KNOW what to remove… it needs to analyze the array and figure out what the common string (if any) is
oh that certainly wasnt clear from the description
start with the “common string” as the file thing from the first one you get handed
then the next one shorten that common string down until it IS what starts the next one
lather rise & repeat until you’ve processed them all
in Xojo its something like (all written in here so take it with a grain of salt)
dim common as string
for I = 0 to countOfStrings
if I = 0 then
common = strings(i)
end if
if strings(i).beginswith(common) then
// do nothing !
else
while strings(i).beginswith(common) = false and common <> ""
common = common.left(common.length - 1)
wend
end
next