-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtils.cpp
More file actions
29 lines (24 loc) · 727 Bytes
/
Copy pathUtils.cpp
File metadata and controls
29 lines (24 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "Utils.h"
#include <iostream>
#include <thread>
#include <chrono>
using namespace std;
void Utils::typingEffect(const string& text, int delay) {
for (char c : text) {
cout << c << flush;
this_thread::sleep_for(chrono::milliseconds(delay));
}
cout << endl;
}
void Utils::printGreen(const string& text) {
cout << "\033[32m" << text << "\033[0m" << endl;
}
void Utils::printYellow(const string& text) {
cout << "\033[33m" << text << "\033[0m" << endl;
}
void Utils::printRed(const string& text) {
cout << "\033[31m" << text << "\033[0m" << endl;
}
void Utils::printBlue(const string& text) {
cout << "\033[34m" << text << "\033[0m" << endl;
}