MCPcopy Create free account

hub / github.com/coooodeer/parse-rust / functions

Functions394 in github.com/coooodeer/parse-rust

↓ 151 callersMethodparse
Parse a string for an exact match against the format. The entire string must match the format pattern. Returns None if the string does not match. #
src/parser.rs:201
↓ 136 callersFunctiony
(fmt, s, e, str_equals=False)
tests/test_parse.py:235
↓ 67 callersFunctionparse
Convenience function: parse a string with a format pattern. This is equivalent to `Parser::new(format).parse(input)` but compiles the format string e
src/parser.rs:504
↓ 40 callersMethodclone
(&self)
src/result.rs:53
↓ 31 callersFunction_check_no_crash
Run *fn* and return its result; fail the test on any unexpected crash.
tests/test_security_inputs.py:35
↓ 16 callersFunction_
(fmt, matches)
tests/test_pattern.py:45
↓ 16 callersMethodmap
(&self, case_sensitive: bool)
src/parser.rs:24
↓ 14 callersMethodsearch
Search for the format pattern anywhere in the string. Unlike `parse()`, the pattern does not need to match the entire string - it can match a substri
src/parser.rs:227
↓ 12 callersFunctionassert_match
(parser, text, param_name, expected)
tests/test_parsetype.py:8
↓ 12 callersFunctioncompile
( py: Python<'_>, format: &str, extra_types: Option<PyObject>, case_sensitive:
src/lib.rs:901
↓ 11 callersFunction_test_expression
(format, expression)
tests/test_pattern.py:6
↓ 11 callersFunctionconvert_value
Convert a matched string to a ParseValue according to the FormatType. This performs the actual type conversion after a successful regex match. For da
src/types.rs:210
↓ 11 callersFunctionmeasure_throughput
Measure throughput over *runs* independent trials. Returns mean values + ``_std`` companions when runs > 1.
benches/benchmark_common.py:133
↓ 10 callersFunctionspec
(format_string: &str, format_type: FormatType)
src/types.rs:431
↓ 9 callersFunctionfindall
Convenience function: find all matches of a format pattern. # Arguments `format` - The format string `input` - The string to search `pos` - Starting
src/parser.rs:534
↓ 9 callersMethodfindall
Find all matches of the format pattern in the string. Returns a vector of ParseResults, one for each match found. # Arguments `input` - The string t
src/parser.rs:242
↓ 9 callersFunctionparse_format_spec
Parse a format specification string into a FormatSpec. The format spec follows Python's format mini-language: `[[fill]align][sign][#][0][width][group
src/compiler.rs:595
↓ 8 callersFunctionparse_datetime_formats
( datetime_cls: &Bound<'_, PyAny>, raw: &str, formats: &[&str], )
src/result.rs:146
↓ 8 callersFunctionsearch
Convenience function: search for a format pattern in a string. # Arguments `format` - The format string `input` - The string to search `case_sensitiv
src/parser.rs:515
↓ 7 callersMethodcompile
Compile the format string into regex pattern and metadata.
src/compiler.rs:183
↓ 7 callersFunctioncompile_format
Compile a format string into a regex pattern and field metadata. This is the main entry point for the compiler. It takes a format string like `"Hello
src/compiler.rs:139
↓ 7 callersMethodevaluate_result
(&self, py: Python<'_>)
src/lib.rs:97
↓ 6 callersFunctionassert_mismatch
(parser, text, param_name)
tests/test_parsetype.py:13
↓ 6 callersFunctionextract_format
( py: Python<'_>, format_spec: &str, extra_types: Option<PyObject>, )
src/lib.rs:741
↓ 6 callersMethodformat
(&self)
src/lib.rs:657
↓ 6 callersFunctionnormalize_short_tz_offset
(raw: &str)
src/result.rs:463
↓ 6 callersFunctionwrap_match
(py: Python<'_>, result: ParseResult)
src/lib.rs:504
↓ 6 callersFunctionwrap_result
(py: Python<'_>, result: ParseResult)
src/lib.rs:420
↓ 5 callersFunctionfinalize_group
(group: str, all_results: list[dict])
benches/benchmark_common.py:521
↓ 5 callersMethodregex_pattern
Get the regex pattern for this format type. Returns a regex pattern string that matches valid input for this type, along with the number of capture g
src/types.rs:111
↓ 4 callersFunction_fmt_val
Format a single value, with ±std suffix when *_std companion exists.
benches/benchmark_common.py:438
↓ 4 callersFunctionassert_fixed_match
(parser, text, expected)
tests/test_parsetype.py:18
↓ 4 callersFunctionget_cached_parser
Get or create a cached Parser for the given format string.
src/parser.rs:68
↓ 4 callersFunctionmap_compile_error
(_py: Python<'_>, err: String)
src/lib.rs:367
↓ 4 callersFunctionparse_format_spec_with_custom
( spec: &str, custom_types: &HashMap<String, CustomTypePattern>, )
src/compiler.rs:599
↓ 4 callersMethodsplit_format
Split format string into literal text, escaped braces, and field specs.
src/compiler.rs:237
↓ 3 callersFunctionbuild_field_pattern
( spec: &FormatSpec, group_name: Option<&str>, custom_types: &HashMap<String, CustomTypePattern>,
src/compiler.rs:498
↓ 3 callersFunctionparse_int_base
Parse an integer with explicit base, stripping base prefix if present.
src/types.rs:382
↓ 3 callersFunctionpercentile
(values: list[float], p: float)
benches/benchmark_common.py:92
↓ 3 callersMethodto_pyobject
Convert this ParseValue to a Python object.
src/result.rs:97
↓ 3 callersMethodtry_evaluate_captures
Extract and type-convert captured values from a regex match. This is where the actual value extraction happens: 1. Iterate over all fields defined in
src/parser.rs:260
↓ 3 callersMethodwrap_match
(&self, py: Python<'_>, result: ParseResult)
src/lib.rs:152
↓ 3 callersMethodwrap_result
(&self, py: Python<'_>, result: ParseResult)
src/lib.rs:148
↓ 2 callersFunctionapply_custom_converters
( py: Python<'_>, mut result: ParseResult, converters: &[CustomFieldConverter], )
src/lib.rs:431
↓ 2 callersFunctionassert_fixed_mismatch
(parser, text)
tests/test_parsetype.py:23
↓ 2 callersFunctioncached_parser
(format: &str, case_sensitive: bool)
src/parser.rs:487
↓ 2 callersFunctionclear_parse_rust_cache
()
benches/benchmark_common.py:106
↓ 2 callersFunctioncompile_format_with_custom
( format: &str, case_sensitive: bool, custom_types: &HashMap<String, CustomTypePattern>, )
src/compiler.rs:143
↓ 2 callersFunctiondatetime_format_to_regex
(format: &str)
src/types.rs:289
↓ 2 callersFunctionescape_fill
(fill: char)
src/compiler.rs:569
↓ 2 callersMethodevaluate_captures
( &self, captures: &regex::Captures<'_>, input: &str, search_offset: usize,
src/parser.rs:343
↓ 2 callersMethodformat_string
Get the original format string.
src/parser.rs:168
↓ 2 callersFunctionget_named_value_mut
( target: &'a mut HashMap<String, ParseValue>, field: &str, )
src/lib.rs:477
↓ 2 callersFunctionis_align_char
Check if a character is an alignment specifier.
src/compiler.rs:694
↓ 2 callersFunctionn
(fmt, s, e)
tests/test_parse.py:245
↓ 2 callersFunctionparse_extra_types
( py: Python<'_>, extra_types: &Bound<'_, PyAny>, )
src/lib.rs:382
↓ 2 callersFunctionparse_iso_datetime
(datetime_cls: &Bound<'_, PyAny>, raw: &str)
src/result.rs:171
↓ 2 callersFunctionpeak_rss_mb
()
benches/benchmark_common.py:85
↓ 2 callersFunctionrust_findall_runner
(template: str, cache_state: str)
benches/benchmark_common.py:311
↓ 2 callersFunctionrust_parse_call
(template: str)
benches/benchmark_common.py:409
↓ 2 callersFunctionrust_parse_runner
(template: str, cache_state: str)
benches/benchmark_common.py:266
↓ 2 callersFunctionrust_search_runner
(template: str, cache_state: str)
benches/benchmark_common.py:281
↓ 2 callersMethodsearch
( &self, py: Python<'_>, string: &str, pos: usize, endpos: Option<usiz
src/lib.rs:176
↓ 2 callersFunctionslice_for_char_range
(input: &str, pos: usize, endpos: Option<usize>)
src/parser.rs:369
↓ 2 callersMethodto_group_name
Convert a field name to a valid regex group name. Replaces characters not valid in regex group names (dots, brackets, hyphens) with underscores, and
src/compiler.rs:427
↓ 2 callersFunctionwrap_findall_iterator
( py: Python<'_>, results: Vec<ParseResult>, evaluate_result: bool, )
src/lib.rs:512
↓ 1 callersFunction_fmt_throughput
Format throughput as integer, with ±std when available.
benches/benchmark_common.py:450
↓ 1 callersFunction_load_parse_rust_for_fallback
()
benches/benchmark_common.py:116
↓ 1 callersFunctionbuild_numeric_core_pattern
(spec: &FormatSpec, fmt_type: &FormatType)
src/compiler.rs:462
↓ 1 callersFunctionbyte_to_char_index
(input: &str, byte_index: usize)
src/parser.rs:411
↓ 1 callersMethodclear_all
(&mut self)
src/parser.rs:47
↓ 1 callersFunctionclear_cache
()
src/parser.rs:92
↓ 1 callersMethodclear_if_full
(&mut self)
src/parser.rs:40
↓ 1 callersFunctiondatetime_to_pyobject
(py: Python<'_>, raw: &str, format: &str)
src/result.rs:276
↓ 1 callersFunctiondecimal_to_pyobject
(py: Python<'_>, raw: &str)
src/result.rs:138
↓ 1 callersFunctiondt_format_to_regex_map
(py: Python<'_>)
src/types.rs:256
↓ 1 callersFunctionensure_result_dirs
()
benches/benchmark_common.py:80
↓ 1 callersFunctionescape_regex
Escape a string for use in a regex pattern. All regex special characters are prefixed with a backslash.
src/compiler.rs:701
↓ 1 callersFunctionexpand_named_fields
(named_fields: HashMap<String, ParseValue>)
src/parser.rs:431
↓ 1 callersFunctionextract_format_dict
( py: Python<'_>, format_spec: &str, extra_types: Option<&Bound<'_, PyAny>>, )
src/lib.rs:328
↓ 1 callersMethodfields
(&self)
src/parser.rs:187
↓ 1 callersMethodfindall
( &self, py: Python<'_>, string: &str, pos: usize, endpos: Option<usiz
src/lib.rs:198
↓ 1 callersMethodfixed
(&self, py: Python<'_>)
src/result.rs:619
↓ 1 callersMethodget_named
Get a named field by name.
src/result.rs:497
↓ 1 callersMethodget_positional_capture
Get the matched string for a positional (unnamed) capture group. Positional groups are tracked by their field index, which maps to regex capture grou
src/parser.rs:359
↓ 1 callersMethodhandle_field
Process a single field specification and return its regex pattern. Handles both named fields (`{name:d}`) and positional fields (`{:d}` or `{}`).
src/compiler.rs:319
↓ 1 callersFunctioninsert_into_map
(target: &mut ParseValue, subkeys: &[String], value: ParseValue)
src/parser.rs:464
↓ 1 callersFunctioninsert_named_value
(target: &mut HashMap<String, ParseValue>, field: &str, value: ParseValue)
src/parser.rs:439
↓ 1 callersMethodis_datetime
Check if this type is a datetime type.
src/types.rs:190
↓ 1 callersMethodis_numeric
Check if this type is numeric (needs sign handling).
src/types.rs:173
↓ 1 callersFunctionmain
()
benches/benchmark_fallback_throughput.py:11
↓ 1 callersFunctionmain
()
benches/benchmark_parse_latency.py:13
↓ 1 callersFunctionmain
()
benches/benchmark_parse_throughput.py:14
↓ 1 callersFunctionmain
()
benches/benchmark_search_throughput.py:16
↓ 1 callersFunctionmain
()
benches/benchmark_findall_throughput.py:16
↓ 1 callersFunctionmake_fixed_tzoffset_class
(py: Python<'_>)
src/lib.rs:239
↓ 1 callersMethodmap_mut
(&mut self, case_sensitive: bool)
src/parser.rs:32
↓ 1 callersFunctionmeasure_latency
(label: str, call_factory, sample_input: str, warm_cache: bool)
benches/benchmark_common.py:167
↓ 1 callersFunctionnormalize_fractional_seconds
(raw: &str)
src/result.rs:163
↓ 1 callersMethodparse
( &self, py: Python<'_>, string: &str, evaluate_result: bool, )
src/lib.rs:156
next →1–100 of 394, ranked by callers