34 lines
675 B
C++
34 lines
675 B
C++
#ifndef DEFS_HPP
|
|
#define DEFS_HPP
|
|
|
|
#include <string>
|
|
#if __has_include(<generator>)
|
|
#include <generator>
|
|
#else
|
|
#include "generator.hpp"
|
|
#endif
|
|
|
|
#include "spdlog/spdlog.h"
|
|
#include "magic_enum.hpp"
|
|
|
|
using std::operator""s;
|
|
using std::operator""sv;
|
|
|
|
enum class DataSource { CSDN, YAHOO };
|
|
|
|
struct Cord {
|
|
int x, y;
|
|
bool operator==(const Cord &rhs) const { return x == rhs.x && y == rhs.y; }
|
|
};
|
|
|
|
bool is_num(char c);
|
|
bool is_alpha(char c);
|
|
|
|
std::generator<std::string> passwords(const DataSource &source);
|
|
|
|
void stat_keystroke(const DataSource &source);
|
|
void stat_length(const DataSource &source);
|
|
void stat_struct(const DataSource &source);
|
|
|
|
#endif // DEFS_HPP
|