Delete char in string
Richmond
richmondmathewson at gmail.com
Wed Feb 19 07:28:22 EST 2014
On 19/02/14 14:09, John Dixon wrote:
> as in something like this...
> put char 2 to (the number of chars of fld 1) of fld 1 into fld 2
>
>
>
Oddly enough THIS works:
put fld "INN" into $INN
delete char 1 of $INN
put $INN into fld "OWT"
BUT, BUT, BIG UNCOMFORTABLE BUT, this:
put fld "INN" into $INN
put fld "URTEXT" into $URTEXT
repeat until $URTEXT is empty
if $INN contains the first char of $URTEXT then
put the first char of $URTEXT after $OUTTEXT
delete the first char of $URTEXT
else
delete the first char of $URTEXT
end if
end repeat
put $OUTTEXT into fld "fOUTTEXT"
Maybe this is because one cannot use CONTAINS with a string variable, Dunno.
Richmond.
More information about the use-livecode
mailing list