37#define TERM_FG_BLACK F("\e[30m")
39#define TERM_FG_RED F("\e[31m")
41#define TERM_FG_GREEN F("\e[32m")
43#define TERM_FG_YELLOW F("\e[33m")
45#define TERM_FG_BLUE F("\e[34m")
47#define TERM_FG_MAGENTA F("\e[35m")
49#define TERM_FG_CYAN F("\e[36m")
51#define TERM_FG_WHITE F("\e[37m")
53#define TERM_FG_HBLACK F("\e[90m")
55#define TERM_FG_HRED F("\e[91m")
57#define TERM_FG_HGREEN F("\e[92m")
59#define TERM_FG_HYELLOW F("\e[93m")
61#define TERM_FG_HBLUE F("\e[94m")
63#define TERM_FG_HMAGENTA F("\e[95m")
65#define TERM_FG_HCYAN F("\e[96m")
67#define TERM_FG_HWHITE F("\e[97m")
75#define TERM_BG_BLACK F("\e[40m")
77#define TERM_BG_RED F("\e[41m")
79#define TERM_BG_GREEN F("\e[42m")
81#define TERM_BG_YELLOW F("\e[43m")
83#define TERM_BG_BLUE F("\e[44m")
85#define TERM_BG_MAGENTA F("\e[45m")
87#define TERM_BG_CYAN F("\e[46m")
89#define TERM_BG_WHITE F("\e[47m")
91#define TERM_BG_HBLACK F("\e[100m")
93#define TERM_BG_HRED F("\e[101m")
95#define TERM_BG_HGREEN F("\e[102m")
97#define TERM_BG_HYELLOW F("\e[103m")
99#define TERM_BG_HBLUE F("\e[104m")
101#define TERM_BG_HMAGENTA F("\e[105m")
103#define TERM_BG_HCYAN F("\e[106m")
105#define TERM_BG_HWHITE F("\e[107m")
113#define TERM_STYLE_NORMAL F("\e[0m")
115#define TERM_STYLE_BOLD F("\e[1m")
117#define TERM_STYLE_ITALIC F("\e[3m")
119#define TERM_STYLE_UNDERLINED F("\e[4m")
121#define TERM_STYLE_BLINK F("\e[5m")
123#define TERM_STYLE_INVERSE F("\e[7m")
143 static void print(
const string text);
172 static void println(
const string text);
220 static void print(
double number);
230 static void println(
double number);
256 static bool printf(
string format, ...);
285 static bool find(
string target,
usize size);
297 static bool find_until(
string target,
string terminator);
Class for handling input/output operations in Rishka applications.
Definition: io.h:134
static i32 available()
Check if there is data available to read from the input stream.
Definition: librishka_io.cpp:134
static bool find(string target, usize size)
Search for a target string in the input stream.
Definition: librishka_io.cpp:142
static void println()
Prints a new line to the output stream.
Definition: librishka_io.cpp:74
static bool find_until(string target, string terminator)
Search for a target string in the input stream until a terminator is encountered.
Definition: librishka_io.cpp:146
static bool printf(string format,...)
Prints formatted output.
Definition: librishka_io.cpp:78
static string readline()
Read a line of text from the input stream.
Definition: librishka_io.cpp:130
static u64 get_timeout()
Get the current timeout for input operations.
Definition: librishka_io.cpp:154
static i32 peek()
Peek at the next character in the input stream.
Definition: librishka_io.cpp:138
static rune readch()
Read a Unicode character from the input stream.
Definition: librishka_io.cpp:126
static void set_timeout(u64 timeout)
Set the timeout for input operations.
Definition: librishka_io.cpp:150
static void print(const string text)
Print text to the output stream.
Definition: librishka_io.cpp:22
#define TERM_STYLE_NORMAL
Normal text style.
Definition: io.h:113
#define TERM_BG_BLACK
Black background color.
Definition: io.h:75
Header file for common data types used in Rishka applications.
signed int i32
Alias for the signed 32-bit integer type.
Definition: types.h:58
char rune
Alias for the Unicode character type.
Definition: types.h:34
signed long int i64
Alias for the signed 64-bit integer type.
Definition: types.h:64
unsigned long int u64
Alias for the unsigned 64-bit integer type.
Definition: types.h:88
u32 usize
Alias for the unsigned integer type representing size.
Definition: types.h:94