#include <G4Tokenizer.hh>
Definition at line 48 of file G4Tokenizer.hh.
◆ G4Tokenizer()
Definition at line 51 of file G4Tokenizer.hh.
51:string2tokenize(stn),actual(0){}
◆ operator()()
G4SubString G4Tokenizer::operator() |
( |
const char * |
str = " \t\n" , |
|
|
size_t |
l = 0 |
|
) |
| |
|
inline |
Definition at line 53 of file G4Tokenizer.hh.
54 {
55 size_t i,j,tmp;
57 if(l==0) l=strlen(str);
58
59 while(actual<string2tokenize.size())
60 {
61
62 for(i=0;i<l;i++)
63 if(string2tokenize[actual]==str[i]) hasws=true;
64 if(hasws)
65 {
66 actual++;
67 hasws=false;
68 }
69 else
70 break;
71 }
72
73 for(j=actual;j<string2tokenize.size();j++)
74 {
75 for(i=0;i<l;i++)
76 if(string2tokenize[j]==str[i]) break;
77 if(i<l) break;
78 }
79 if(j!=string2tokenize.size())
80 {
81 tmp=actual;
82 actual=j+1;
83 return string2tokenize(tmp,j-tmp);
84 }
85 else
86 {
87 tmp=actual;
88 actual=j;
89 return string2tokenize(tmp,j-tmp);
90 }
91 }
The documentation for this class was generated from the following file: