mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
34 lines
777 B
C++
34 lines
777 B
C++
#include <AK/AKString.h>
|
|
#include <AK/LogStream.h>
|
|
#include <AK/StringView.h>
|
|
|
|
namespace AK {
|
|
|
|
inline const LogStream& operator<<(const LogStream& stream, const String& value)
|
|
{
|
|
stream.write(value.characters(), value.length());
|
|
return stream;
|
|
}
|
|
|
|
inline const LogStream& operator<<(const LogStream& stream, const StringView& value)
|
|
{
|
|
stream.write(value.characters(), value.length());
|
|
return stream;
|
|
}
|
|
|
|
const LogStream& operator<<(const LogStream& stream, int value)
|
|
{
|
|
return stream << String::number(value);
|
|
}
|
|
|
|
const LogStream& operator<<(const LogStream& stream, unsigned value)
|
|
{
|
|
return stream << String::number(value);
|
|
}
|
|
|
|
const LogStream& operator<<(const LogStream& stream, const void* value)
|
|
{
|
|
return stream << String::format("%p", value);
|
|
}
|
|
|
|
}
|