| 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 <algorithm> | 20 #include <algorithm> | 
| 21 #include <cstddef> | 21 #include <cstddef> | 
| 22 #include <cstring> | 22 #include <cstring> | 
| 23 #include <type_traits> | 23 #include <type_traits> | 
| 24 | 24 | 
|  | 25 #include "base.h" | 
| 25 #include "debug.h" | 26 #include "debug.h" | 
| 26 #include "library.h" | 27 #include "library.h" | 
| 27 | 28 | 
|  | 29 ABP_NS_BEGIN | 
|  | 30 | 
| 28 inline void String_assert_writable(bool isWritable); | 31 inline void String_assert_writable(bool isWritable); | 
| 29 | 32 | 
| 30 class String | 33 class String | 
| 31 { | 34 { | 
| 32   friend class DependentString; | 35   friend class DependentString; | 
| 33   friend class OwnedString; | 36   friend class OwnedString; | 
| 34 | 37 | 
| 35 public: | 38 public: | 
| 36   typedef char16_t value_type; | 39   typedef char16_t value_type; | 
| 37   typedef size_t size_type; | 40   typedef size_t size_type; | 
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 398     if (negative) | 401     if (negative) | 
| 399       mBuf[pos++] = '-'; | 402       mBuf[pos++] = '-'; | 
| 400 | 403 | 
| 401     for (int i = size - 1; i >= 0; i--) | 404     for (int i = size - 1; i >= 0; i--) | 
| 402     { | 405     { | 
| 403       mBuf[pos + i] = '0' + (num % 10); | 406       mBuf[pos + i] = '0' + (num % 10); | 
| 404       num /= 10; | 407       num /= 10; | 
| 405     } | 408     } | 
| 406   } | 409   } | 
| 407 }; | 410 }; | 
|  | 411 | 
|  | 412 ABP_NS_END | 
| OLD | NEW | 
|---|