I currently just can’t figure out how to strip characters from a TString. I know that it’s described in the TString class, however I can’t get it to work - a simple example would be useful. E.g. if I have TString a=“test.eps”, how do I “Strip” the .eps ending?
You can do:TString s = "test.eps";
Int_t dot = s.First('.');
Int_t len = s.Length();
s.Remove(dot,len-dot);
For more TString examples see $ROOTSYS/test/tstring.cxx.
This method removes the given character from the beginning and/or from the end of the string. The returned sub-string is printed below the code lines:[code]root [0] TString s = “11test.eps222”;
root [1] s.Strip(TString::kLeading,‘1’)
(class TString)“test.eps222”