📄 mystring.h
字号:
#ifndef _MYSTRING_#define _MYSTRING_#include <sys/ioctl.h>#include <unistd.h>#include <stdlib.h>#include <stdio.h>#include <termios.h>#include <sys/types.h>#include <string.h>/* press the up diretion will make three char. the first is '\e'(the value is 27),the second is ']',and the third is different. up is 'A',down is 'B',right is 'C'and left is 'D'. I define the const var just for simple. use unicode is valid.*/const signed char KEYUP = (signed char)((signed char)('A') |(signed char)(0x80));const signed char KEYDOWN = (signed char)((signed char)('B') |(signed char)(0x80));const signed char KEYRIGHT = (signed char)((signed char)('C') |(signed char)(0x80));const signed char KEYLEFT = (signed char)((signed char)('D') |(signed char)(0x80));const signed char DELETE = (signed char)(0xff);const signed char BACKSPACE = (signed char)(0x7f);void free__(char** buf);void free__(char** buf,int num);//judeg a char is printable,or is't printablebool isprint_(char a);bool ismatchin(char* s);//process pathvoid dirproc(char* s);char* find_dirlast(char* s);//more cursorinline void cursormove(char);inline void cursormove(char,int);void setnoecho(void); //set input mode no echovoid setnonor(void); //set input mode no normalchar* strncpy_(char* o, char* s, int size);void show_arr_char(char** buf, int num);void show_arr_char(char** buf);int find(char* a,char b);char getch_(void);char scanf_(char*& buf);char scanf_(char*& buf,int& sze,bool showbufflag);int blockchar(char*,char**& ,int&);int connect(char**,int ,char*&);void replace(char*& o, int begin, int end, char* x);const signed char TRAN_ABLE = (signed char)('\\');const signed char TRAN_NOABLE = (signed char)(TRAN_ABLE | 0x80); void tranable(char*);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -