-
Notifications
You must be signed in to change notification settings - Fork 1
/
StringData.h
31 lines (26 loc) · 986 Bytes
/
StringData.h
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
#include <string>
#include <vector>
#include <chrono>
inline long long systemTimeNanoseconds()
{
return std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::time_point_cast<std::chrono::milliseconds>(
std::chrono::system_clock::now()
).time_since_epoch()
).count();
}
inline std::vector<std::string>& getStringData()
{
static std::vector<std::string> stringDataSet;
if (stringDataSet.size() == 0)
{
char tempSet[6] = " ";
for (tempSet[0] = 'a'; tempSet[0] <= 'z'; tempSet[0]++)
for (tempSet[1] = 'a'; tempSet[1] <= 'z'; tempSet[1]++)
for (tempSet[2] = 'a'; tempSet[2] <= 'z'; tempSet[2]++)
for (tempSet[3] = 'a'; tempSet[3] <= 'z'; tempSet[3]++)
for (tempSet[4] = 'a'; tempSet[4] <= 'z'; tempSet[4]++)
stringDataSet.push_back(std::string(tempSet));
}
return stringDataSet;
}