CppSwitch

范围 case

部分编译器支持 case x ... y 这是编译器扩展。

switch (c) {
case ' ':
  break;
case '0' ... '9':
case '.':
  break;
}