-
Notifications
You must be signed in to change notification settings - Fork 0
/
Example.cpp
executable file
·45 lines (37 loc) · 1.09 KB
/
Example.cpp
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
39
40
41
42
43
44
45
/**
* Author: chankruze (Chandan Kumar Mandal)
* Mail: chankruze@geekofia.in
*
* Copyright (c) Geekofia 2020 and beyond
**/
#include <iostream>
#include "geekofia.h"
#include "log.h"
int main() {
Log log;
log.setLogLevel(Log::LevelError);
log.Error("This is an error message");
log.Warning("This is an warning message");
log.Info("This is an info message");
int num = 231;
// decimal to hex
println("#" + toHex(num));
// decimal to bin
println(toBin(num));
// isogram check
println(isIsogram("test"));
// split string with multiple delims
std::vector<std::string> res = split("(*Nove*mber 19, 2019)", " ,()*");
println("\n-- String Split --");
for (std::string elem : res) {
println(elem);
}
println("------------------");
// find the day of the week form a date
println("\n-- Day of Week --");
print("2nd February 2016 is ");
println(calcDay(2, 2, 2016));
print("29th August 2020 is ");
println(calcDay(29, 8, 2020));
println("-------------------");
}