| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 
| 3  * Copyright (C) 2006-present eyeo GmbH | 3  * Copyright (C) 2006-present eyeo GmbH | 
| 4  * | 4  * | 
| 5  * Adblock Plus is free software: you can redistribute it and/or modify | 5  * Adblock Plus is free software: you can redistribute it and/or modify | 
| 6  * it under the terms of the GNU General Public License version 3 as | 6  * it under the terms of the GNU General Public License version 3 as | 
| 7  * published by the Free Software Foundation. | 7  * published by the Free Software Foundation. | 
| 8  * | 8  * | 
| 9  * Adblock Plus is distributed in the hope that it will be useful, | 9  * Adblock Plus is distributed in the hope that it will be useful, | 
| 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
| 12  * GNU General Public License for more details. | 12  * GNU General Public License for more details. | 
| 13  * | 13  * | 
| 14  * You should have received a copy of the GNU General Public License | 14  * You should have received a copy of the GNU General Public License | 
| 15  * along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>. | 15  * along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>. | 
| 16  */ | 16  */ | 
| 17 | 17 | 
| 18 #pragma once | 18 #pragma once | 
| 19 | 19 | 
|  | 20 #include "base.h" | 
| 20 #include "String.h" | 21 #include "String.h" | 
| 21 | 22 | 
|  | 23 ABP_NS_BEGIN | 
|  | 24 | 
| 22 class StringScanner | 25 class StringScanner | 
| 23 { | 26 { | 
| 24 private: | 27 private: | 
| 25   const DependentString mStr; | 28   const DependentString mStr; | 
| 26   String::size_type mPos; | 29   String::size_type mPos; | 
| 27   String::size_type mEnd; | 30   String::size_type mEnd; | 
| 28   String::value_type mTerminator; | 31   String::value_type mTerminator; | 
| 29 public: | 32 public: | 
| 30   explicit StringScanner(const String& str, String::size_type pos = 0, | 33   explicit StringScanner(const String& str, String::size_type pos = 0, | 
| 31         String::value_type terminator = u'\0') | 34         String::value_type terminator = u'\0') | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
| 59     return false; | 62     return false; | 
| 60   } | 63   } | 
| 61 | 64 | 
| 62   bool skip(String::value_type ch) | 65   bool skip(String::value_type ch) | 
| 63   { | 66   { | 
| 64     bool skipped = false; | 67     bool skipped = false; | 
| 65     while ((skipped = skipOne(ch))); | 68     while ((skipped = skipOne(ch))); | 
| 66     return skipped; | 69     return skipped; | 
| 67   } | 70   } | 
| 68 }; | 71 }; | 
|  | 72 | 
|  | 73 ABP_NS_END | 
| OLD | NEW | 
|---|