How do I remove part of a path?

Roger Eller roger.e.eller at sealedair.com
Mon Aug 1 15:23:50 EDT 2011


On Mon, Aug 1, 2011 at 3:01 PM, Peter Brigham MD wrote:

> When you replace item 4 of tStr with empty, you don't delete the item
> itself, you just make the item empty:
>
> put "a/b/c/d/e/f" into k
> set itemdel to "/"
> put "" into item 4 of k
> put k
>
>  -> a/b/c//e/f
>
> What you need to do is delete the item itself:
>
> put "a/b/c/d/e/f" into k
> set itemdel to "/"
> delete item 4 of k -- note the change
> put k
>
>  -> a/b/c/e/f
>
> -- Peter
>
> Peter M. Brigham
> pmbrig at gmail.com
> http://home.comcast.net/~pmbrig
>
>
And Peter wins the prize!!!! <applause> <whistling> <streamers>

That is awesomely simple...  "delete" item 4 of k

~Roger



More information about the Use-livecode mailing list