📄 option.h
字号:
#include <limits.h>/* This parses an option string, much like getopt() Usage: OptionParser o("-v -y", "vy"); String args; int c; while ((c = o.nextOption(args))) switch (c) { case 'v': case 'y': default: print ("Unknown option: %c\n", c); } printf ("Leftover options: %s\n", (const char *) args); */class OptionParser{public: OptionParser(const char *_s, const char *_options); int nextOption(String &args); // result codes static const int invalidOption = -1; private: String s; String options; typedef enum {optionNotSet, noArgument, optionalArgument, requiredArgument} arg_t; arg_t option_table[UCHAR_MAX+1];};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -