| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "wtf/text/StringView.h" | 5 #include "wtf/text/StringView.h" |
| 6 | 6 |
| 7 #include "wtf/text/AtomicString.h" |
| 8 #include "wtf/text/WTFString.h" |
| 9 |
| 7 namespace WTF { | 10 namespace WTF { |
| 8 | 11 |
| 9 StringView::StringView(const UChar* chars) | 12 StringView::StringView(const UChar* chars) |
| 10 : StringView(chars, chars ? lengthOfNullTerminatedString(chars) : 0) {} | 13 : StringView(chars, chars ? lengthOfNullTerminatedString(chars) : 0) {} |
| 11 | 14 |
| 12 #if DCHECK_IS_ON() | 15 #if DCHECK_IS_ON() |
| 13 StringView::~StringView() | 16 StringView::~StringView() |
| 14 { | 17 { |
| 15 DCHECK(m_impl); | 18 DCHECK(m_impl); |
| 16 DCHECK(!m_impl->hasOneRef()) | 19 DCHECK(!m_impl->hasOneRef()) |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 if (b.is8Bit()) | 73 if (b.is8Bit()) |
| 71 return equalIgnoringASCIICase(a.characters8(), b.characters8(), a.le
ngth()); | 74 return equalIgnoringASCIICase(a.characters8(), b.characters8(), a.le
ngth()); |
| 72 return equalIgnoringASCIICase(a.characters8(), b.characters16(), a.lengt
h()); | 75 return equalIgnoringASCIICase(a.characters8(), b.characters16(), a.lengt
h()); |
| 73 } | 76 } |
| 74 if (b.is8Bit()) | 77 if (b.is8Bit()) |
| 75 return equalIgnoringASCIICase(a.characters16(), b.characters8(), a.lengt
h()); | 78 return equalIgnoringASCIICase(a.characters16(), b.characters8(), a.lengt
h()); |
| 76 return equalIgnoringASCIICase(a.characters16(), b.characters16(), a.length()
); | 79 return equalIgnoringASCIICase(a.characters16(), b.characters16(), a.length()
); |
| 77 } | 80 } |
| 78 | 81 |
| 79 } // namespace WTF | 82 } // namespace WTF |
| OLD | NEW |