4#include "../Strings/StringFormat.h"
35 template <
typename... Types>
65#if SC_PLATFORM_WINDOWS
67 bool isConsole =
true;
68 bool isDebugger =
true;
76#if !defined(SC_LOG_MESSAGE)
77#define SC_LOG_MESSAGE(fmt, ...) \
79 globalConsole->print(fmt, ##__VA_ARGS__)
Writes to console using SC::StringFormat.
Definition Console.h:25
void print(const StringSpan str)
Prints a StringSpan to console.
void printLine(const StringSpan str)
Prints a StringSpan to console and adds a newline at the end of it.
static bool isAttachedToConsole()
Returns true if current process has an active console (Windows only, returns true elsewhere)
bool print(StringSpan fmt, Types &&... args)
Prints a formatted string using SC::StringFormat.
Definition Console.h:36
static bool tryAttachingToParentConsole()
Tries attaching current process to parent console (Windows only, has no effect elsewhere)
Console(Span< char > conversionBuffer={})
Constructs a console with an OPTIONAL conversion buffer used for UTF encoding conversions on Windows.
View over a contiguous sequence of items (pointer + size in elements).
Definition Span.h:29
An read-only view over a string (to avoid including Strings library when parsing is not needed).
Definition StringSpan.h:37
constexpr StringEncoding getEncoding() const
Get encoding of this StringView.
Definition StringSpan.h:83