SNOOPerToCSV/Inc/Tool_Functions.hpp

31 lines
735 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __TOOL_FUNCTIONS_HPP__
#define __TOOL_FUNCTIONS_HPP__
#include "Config.hpp"
extern "C"
{
#include "stdint.h"
#include "stdio.h"
#include "stdbool.h"
}
// 行进到上一行起始位置
size_t f_seek_pre_line_begin(FILE *file);
// 读取文件一行
size_t f_getline(FILE *file, char *buffer, const size_t buffer_len);
// 进度条打印
void progress_print(size_t completed, size_t total, bool reflush);
// 16进制字符串转有效无符号整数8字节
uint64_t hex_to_value(const char *str);
// 判定字符串是否全部为有效数字
bool is_full_num(const char *str);
// 十进制字符串转有效无符号整数8字节
uint64_t str_to_value(const char *str);
#endif