#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_TEXT_WTF_STRING_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_TEXT_WTF_STRING_H_
#include <iosfwd>
#include <string_view>
#include <type_traits>
#include "base/containers/span.h"
#include "build/build_config.h"
#include "third_party/abseil-cpp/absl/base/attributes.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/integer_to_string_conversion.h"
#include "third_party/blink/renderer/platform/wtf/text/string_impl.h"
#include "third_party/blink/renderer/platform/wtf/text/string_view.h"
#include "third_party/blink/renderer/platform/wtf/wtf_export.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"
namespace WTF {
class CodePointIterator;
#define DISPATCH_CASE_OP …
class WTF_EXPORT String { … };
#undef DISPATCH_CASE_OP
inline bool operator==(const String& a, const String& b) { … }
inline bool operator==(const String& a, const char* b) { … }
inline bool operator==(const char* a, const String& b) { … }
inline bool operator!=(const String& a, const String& b) { … }
inline bool operator!=(const String& a, const char* b) { … }
inline bool operator!=(const char* a, const String& b) { … }
inline bool EqualIgnoringNullity(const String& a, const String& b) { … }
template <wtf_size_t inlineCapacity>
inline bool EqualIgnoringNullity(const Vector<UChar, inlineCapacity>& a,
const String& b) { … }
inline void swap(String& a, String& b) { … }
template <wtf_size_t inlineCapacity>
String::String(const Vector<UChar, inlineCapacity>& vector)
: impl_(vector.size() ? StringImpl::Create(vector.data(), vector.size())
: StringImpl::empty_) { … }
template <>
inline const LChar* String::GetCharacters<LChar>() const { … }
template <>
inline const UChar* String::GetCharacters<UChar>() const { … }
inline bool String::ContainsOnlyLatin1OrEmpty() const { … }
#ifdef __OBJC__
inline NSString* NsStringNilIfEmpty(const String& str) {
return str.empty() ? nil : (NSString*)str;
}
#endif
WTF_EXPORT int CodeUnitCompare(const String&, const String&);
inline bool CodeUnitCompareLessThan(const String& a, const String& b) { … }
WTF_EXPORT int CodeUnitCompareIgnoringASCIICase(const String&, const char*);
inline bool CodeUnitCompareIgnoringASCIICaseLessThan(const String& a,
const String& b) { … }
template <bool isSpecialCharacter(UChar)>
inline bool String::IsAllSpecialCharacters() const { … }
template <typename BufferType>
void String::AppendTo(BufferType& result,
unsigned position,
unsigned length) const { … }
template <typename BufferType>
void String::PrependTo(BufferType& result,
unsigned position,
unsigned length) const { … }
template <typename T>
struct HashTraits;
template <>
struct HashTraits<String>;
WTF_EXPORT extern const String& g_empty_string;
WTF_EXPORT extern const String& g_empty_string16_bit;
WTF_EXPORT extern const String& g_xmlns_with_colon;
class WTF_EXPORT NewlineThenWhitespaceStringsTable { … };
WTF_EXPORT std::ostream& operator<<(std::ostream&, const String&);
inline StringView::StringView(const String& string
ABSL_ATTRIBUTE_LIFETIME_BOUND,
unsigned offset,
unsigned length)
: … { … }
inline StringView::StringView(const String& string
ABSL_ATTRIBUTE_LIFETIME_BOUND,
unsigned offset)
: … { … }
inline StringView::StringView(
const String& string ABSL_ATTRIBUTE_LIFETIME_BOUND)
: … { … }
}
WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(…)
kStrictUTF8Conversion;
kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD;
String;
g_empty_string;
g_empty_string16_bit;
Equal;
Find;
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#endif