-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstring_effects.cpp
More file actions
38 lines (29 loc) · 811 Bytes
/
Copy pathstring_effects.cpp
File metadata and controls
38 lines (29 loc) · 811 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
30
31
32
33
34
35
36
37
38
//
// Created by Will Lane on 2/2/21.
//
#include "string_effects.h"
#include <string>
std::string bold(const std::string& input) {
return "\x1B[1m" + input + "\x1B[0m";
}
std::string dimmed(const std::string& input) {
return "\x1B[2m" + input + "\x1B[0m";
}
std::string italic(const std::string& input) {
return "\x1B[3m" + input + "\x1B[0m";
}
std::string underline(const std::string& input) {
return "\x1B[4m" + input + "\x1B[0m";
}
std::string blink(const std::string& input) {
return "\x1B[5m" + input + "\x1B[0m";
}
std::string reverse(const std::string& input) {
return "\x1B[7m" + input + "\x1B[0m";
}
std::string hidden(const std::string& input) {
return "\x1B[8m" + input + "\x1B[0m";
}
std::string stricken(const std::string& input) {
return "\x1B[9m" + input + "\x1B[0m";
}