diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-16 22:47:37 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:48 +0200 |
commit | 8dd3622c6d3c85adbb293eacf61f76c1118c9255 (patch) | |
tree | 70422f67bdad21924b27a5c6d9a6260fa4c77e7a /src/strfnd.h | |
parent | 564c3a9c960e84b69502540d39fcc056fcd4bdf7 (diff) | |
download | minetest-8dd3622c6d3c85adbb293eacf61f76c1118c9255.tar.gz minetest-8dd3622c6d3c85adbb293eacf61f76c1118c9255.tar.bz2 minetest-8dd3622c6d3c85adbb293eacf61f76c1118c9255.zip |
Improve item serialization
Diffstat (limited to 'src/strfnd.h')
-rw-r--r-- | src/strfnd.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/strfnd.h b/src/strfnd.h index e3d380e37..049ae0bae 100644 --- a/src/strfnd.h +++ b/src/strfnd.h @@ -65,6 +65,19 @@ public: //std::cout<<"palautus=\""<<palautus<<"\""<<std::endl; return palautus; } + void skip_over(std::string chars){ + while(p < tek.size()){ + bool is = false; + for(unsigned int i=0; i<chars.size(); i++){ + if(chars[i] == tek[p]){ + is = true; + break; + } + } + if(!is) break; + p++; + } + } bool atend(){ if(p>=tek.size()) return true; return false; |