duplicates of parts of a line in list
hh
hh at livecode.org
Sun Aug 3 08:03:18 EDT 2014
Do you mean char 7 to 8?
And list 2 is not the result of this counting for list 1? Should be
08:00_d3_180_Monica_pink_1
10:45_d2_90_Mary_orange_6
10:00_d2_90_Mary_orange_6
10:15_d2_90_Mary_orange_6
10:30_d2_90_Mary_orange_6
10:00_d2_90_Mary_orange_6
10:00_d2_90_Mary_orange_6
12:30_d5_45_Mary_blue_3
12:45_d5_45_Mary_blue_3
12:60_d5_45_Mary_blue_3
If I got this right then try this:
function myCounter myList
repeat for each line l in myList
if l is empty then next repeat
add 1 to f[char 1 to 2 of l &comma& char 7 to 8 of l]
end repeat
repeat for each line l in myList
if l is empty then next repeat
put cr & l & "_" & f[char 1 to 2 of l &comma& char 7 to 8 of l] after s
end repeat
delete char 1 of s -- is return
return s
end myCounter
More information about the use-livecode
mailing list