Re: [ROOT] TSting::DataCopy

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Fri Mar 29 2002 - 19:39:08 MET


Hi Miha,

  just do:

 char *s = StrDup(tstring);

Cheers, Fons.




On Fri, 2002-03-29 at 11:24, miha.puc@marvin.fmf.uni-lj.si wrote:
> Hi!
> I think something like
> 
> //__________________________________
> char *TString::DataCopy()
> {
>    char *c = new char[Length()+1];
>    strcpy(c, fData);
>    return c;
> }
> 
> would be useful.
> regards
> Miha
> -- 
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:47 MET