MCPcopy Index your code
hub / github.com/RustPython/RustPython / category

Function category

crates/sre_engine/src/engine.rs:1223–1244  ·  view source on GitHub ↗
(cat_code: SreCatCode, c: u32)

Source from the content-addressed store, hash-verified

1221}
1222
1223fn 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
1246fn charset(set: &[u32], ch: u32) -> bool {
1247 /* check if character is a member of the given set */

Callers 3

warn_explicitFunction · 0.85
_matchFunction · 0.85
charsetFunction · 0.85

Calls 9

is_digitFunction · 0.85
is_spaceFunction · 0.85
is_wordFunction · 0.85
is_linebreakFunction · 0.85
is_loc_wordFunction · 0.85
is_uni_digitFunction · 0.85
is_uni_spaceFunction · 0.85
is_uni_wordFunction · 0.85
is_uni_linebreakFunction · 0.85

Tested by

no test coverage detected