On Thu, Sep 11, 2008 at 8:29 AM, Joseph Wright
<[log in to unmask]> wrote:
> Hi,
>
> I'm currently replacing
>
> \toks@{stuff including "#1"}
> \edef\myvar{\the\toks@}
>
> by
>
> \toks_set:No \l_tmpa_toks {stuff including "#1"}

\toks_set:Nn I think you mean.

> \tlp_set:Nx \l_my_tlp {\toks_use:N\l_tmpa_toks}
>
> Is there a pre-coded function for this (I may have misunderstood somewhere).

Not exactly precoded but what you usually do is
  \tlp_set:Nx \l_my_tlp {\exp_not:n{unexpanded #1}}
The at first sight weird looking \exp_not:o and \exp_not:f start
becoming more useful in this context.
-- 
Morten