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

Method get_value

crates/vm/src/anystr.rs:48–55  ·  view source on GitHub ↗
(self, len: usize)

Source from the content-addressed store, hash-verified

46
47impl StartsEndsWithArgs {
48 pub fn get_value(self, len: usize) -> (PyObjectRef, Option<Range<usize>>) {
49 let range = if self.start.is_some() || self.end.is_some() {
50 Some(adjust_indices(self.start, self.end, len))
51 } else {
52 None
53 };
54 (self.affix, range)
55 }
56
57 #[inline]
58 pub fn prepare<S, F>(self, s: &S, len: usize, substr: F) -> Option<(PyObjectRef, &S)>

Callers 1

prepareMethod · 0.45

Calls 2

adjust_indicesFunction · 0.85
SomeClass · 0.50

Tested by

no test coverage detected