/**
 * @file convert.h
 * @author Chen Jihang (embedded@eseaoptics.com)
 * @brief 字符串相关的转换函数
 * @version 1.0
 * @date 2022-07-18
 * 
 * @copyright ESEA (c) 2022
 * 
 */
#ifndef CONVERT_H_
#define CONVERT_H_
#include <stdint.h>
unsigned convert_u64_to_s(uint64_t integer,char *str,unsigned length);
unsigned convert_s_to_u64(uint64_t *integer,char *str,unsigned length);
unsigned convert_i64_to_s(int64_t integer,char *str,unsigned length);
unsigned convert_s_to_i64(int64_t *integer,char *str,unsigned length);

/*  数字 1001 --  0x31303031*/
unsigned convert_u32_to_s(uint32_t integer,char *str,unsigned length);
unsigned convert_s_to_u32(uint32_t *integer,char *str,unsigned length);
unsigned convert_i32_to_s(int32_t integer,char *str,unsigned length);
unsigned convert_s_to_i32(int32_t *integer,char *str,unsigned length);
unsigned convert_d2s(double double_float,char *str,unsigned length,unsigned sig);
unsigned convert_s2d(double *double_float,char *str,unsigned length,unsigned sig);
unsigned convert_i2s(int integer,char *str,unsigned length);
unsigned convert_s2i(int *integer,char *str,unsigned length);
unsigned convert_u2s(unsigned integer,char *str,unsigned length);
unsigned convert_s2u(unsigned *integer,char *str,unsigned length);
unsigned convert_ips2ip(uint32_t *ip,char *ips,unsigned length);
unsigned convert_ip2ips(uint32_t ip,char *ips,unsigned length);
#endif