Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-4399

TString::Tokenize() with subsequent delimiters

    XMLWordPrintable

    Details

      Description

      Here is a problem:
      String manipulation changed between 5.32 and 5.34, for the worst.
      Please find the enclosed test program and also 2 different outputs below.
      Best,
      G.

      #include <iostream>
      #include <string>
      void abc(){
      Ssiz_t from = 0;
      TString act;
      TString option="-FF 1  -FF 2"; // with 2 spaces
       
      do {
        if (!option.Tokenize(act, from, " ")) {
          cout  << "finished parsing cmdline params" << endl;
        }
        cout <<  act << " :"  << act.Sizeof() << endl;
        if  (act == "-FF")  {                     // FF analysis
          option.Tokenize(act, from, " ");
          cout << "FF is:" << act.Atoi() << endl;
        }
      } while ( act.Sizeof() > 1   );
      }
       
       
      ROOT 5.34/00 (branches/v5-34-00-patches@44555, Jun 21 2012, 11:52:00 on macosx64)
       
      CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
      Type \? for help. Commands must be C++ statements.
      Enclose multiple statements between { }.
      root [0]
      Processing /Users/ngu/abc.C...
      \-FF :4
      FF is:1
      :1
       
      \-=-=-=-=-=-=-=-=-=
       
      ROOT 5.32/00 (tags/v5-32-00@42375, Dec 02 2011, 12:42:25 on macosx64)
       
      CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
      Type \? for help. Commands must be C++ statements.
      Enclose multiple statements between { }.
      root [0]
      Processing abc.C...
      \-FF :4
      FF is:1
      \-FF :4
      FF is:2
      finished parsing cmdline params:
      :1

        Attachments

          Activity

            People

            • Assignee:
              mato Pere Mato Vila
              Reporter:
              axel Axel Naumann
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: