delete specified text?
Richmond
richmondmathewson at gmail.com
Wed Jul 23 03:49:14 EDT 2014
So; I have an urge to delete some text from lines of a list field, like
this:
put 1 into QOUNT
repeat until line QOUNT of fld "PROCD" is empty
delete word 2 of line QOUNT of fld "PROCD"
add 1 to QOUNT
end repeat
which is all fine and dandy.
The ONLY problem is that the word ('Plovdiv') that I want to remove from
the lines of the list field is NOT always the second word . . .
Ever a trier, I tried this:
put 1 into QOUNT
repeat until line QOUNT of fld "PROCD" is empty
delete "Plovdiv" from line QOUNT of fld "PROCD"
add 1 to QOUNT
end repeat
No joy . . .
Now, I suppose I could have a routine that trots down the line checking
if each word is 'Plovdiv',
and if so, deleting it.
Seems a bit wasteful and slow . . .
-------------------------------------
I t would be rather jolly if
delete "Specific word" from line X of fld "Y"
could be implemented.
Richmond.
More information about the use-livecode
mailing list