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

Function parse_alternate_form

crates/common/src/format.rs:271–277  ·  view source on GitHub ↗
(text: &Wtf8)

Source from the content-addressed store, hash-verified

269}
270
271fn parse_alternate_form(text: &Wtf8) -> (bool, &Wtf8) {
272 let mut chars = text.code_points();
273 match chars.next().and_then(CodePoint::to_char) {
274 Some('#') => (true, chars.as_wtf8()),
275 _ => (false, text),
276 }
277}
278
279fn parse_zero(text: &Wtf8) -> (bool, &Wtf8) {
280 let mut chars = text.code_points();

Callers 1

_parseMethod · 0.85

Calls 3

code_pointsMethod · 0.80
nextMethod · 0.45
as_wtf8Method · 0.45

Tested by

no test coverage detected