(cat_code: SreCatCode, c: u32)
| 1221 | } |
| 1222 | |
| 1223 | fn category(cat_code: SreCatCode, c: u32) -> bool { |
| 1224 | match cat_code { |
| 1225 | SreCatCode::DIGIT => is_digit(c), |
| 1226 | SreCatCode::NOT_DIGIT => !is_digit(c), |
| 1227 | SreCatCode::SPACE => is_space(c), |
| 1228 | SreCatCode::NOT_SPACE => !is_space(c), |
| 1229 | SreCatCode::WORD => is_word(c), |
| 1230 | SreCatCode::NOT_WORD => !is_word(c), |
| 1231 | SreCatCode::LINEBREAK => is_linebreak(c), |
| 1232 | SreCatCode::NOT_LINEBREAK => !is_linebreak(c), |
| 1233 | SreCatCode::LOC_WORD => is_loc_word(c), |
| 1234 | SreCatCode::LOC_NOT_WORD => !is_loc_word(c), |
| 1235 | SreCatCode::UNI_DIGIT => is_uni_digit(c), |
| 1236 | SreCatCode::UNI_NOT_DIGIT => !is_uni_digit(c), |
| 1237 | SreCatCode::UNI_SPACE => is_uni_space(c), |
| 1238 | SreCatCode::UNI_NOT_SPACE => !is_uni_space(c), |
| 1239 | SreCatCode::UNI_WORD => is_uni_word(c), |
| 1240 | SreCatCode::UNI_NOT_WORD => !is_uni_word(c), |
| 1241 | SreCatCode::UNI_LINEBREAK => is_uni_linebreak(c), |
| 1242 | SreCatCode::UNI_NOT_LINEBREAK => !is_uni_linebreak(c), |
| 1243 | } |
| 1244 | } |
| 1245 | |
| 1246 | fn charset(set: &[u32], ch: u32) -> bool { |
| 1247 | /* check if character is a member of the given set */ |
no test coverage detected