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

Method splitn

crates/wtf8/src/lib.rs:1043–1047  ·  view source on GitHub ↗
(&self, n: usize, pat: &Wtf8)

Source from the content-addressed store, hash-verified

1041 }
1042
1043 pub fn splitn(&self, n: usize, pat: &Wtf8) -> impl Iterator<Item = &Self> {
1044 self.as_bytes()
1045 .splitn_str(n, pat)
1046 .map(|w| unsafe { Wtf8::from_bytes_unchecked(w) })
1047 }
1048
1049 pub fn rsplit(&self, pat: &Wtf8) -> impl Iterator<Item = &Self> {
1050 self.as_bytes()

Callers 9

criterion_benchmarkFunction · 0.80
detect_source_encodingFunction · 0.80
splitMethod · 0.80
partitionMethod · 0.80
format_exponentFunction · 0.80
format_generalFunction · 0.80

Calls 2

mapMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected