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

Method new_with_char_len

crates/vm/src/builtins/str.rs:438–441  ·  view source on GitHub ↗
(s: T, char_len: usize)

Source from the content-addressed store, hash-verified

436 }
437
438 unsafe fn new_with_char_len<T: DeduceStrKind + Into<Box<Wtf8>>>(s: T, char_len: usize) -> Self {
439 let kind = s.str_kind();
440 unsafe { StrData::new_with_char_len(s.into(), kind, char_len) }.into()
441 }
442
443 /// # Safety
444 /// Given `bytes` must be ascii

Callers

nothing calls this directly

Calls 1

str_kindMethod · 0.80

Tested by

no test coverage detected