MCPcopy Create free account
hub / github.com/denoland/rust-urlpattern / make_component_string

Method make_component_string

src/constructor_parser.rs:229–235  ·  view source on GitHub ↗

Ref: https://wicg.github.io/urlpattern/#make-a-component-string

(&self)

Source from the content-addressed store, hash-verified

227
228 // Ref: https://wicg.github.io/urlpattern/#make-a-component-string
229 fn make_component_string(&self) -> String {
230 assert!(self.token_index < self.token_list.len());
231 let token = &self.token_list[self.token_index];
232 let component_start_index = self.get_safe_token(self.component_start).index;
233
234 self.input[component_start_index..token.index].to_owned()
235 }
236
237 // Ref: https://wicg.github.io/urlpattern/#rewind-and-set-state
238 #[inline]

Callers 2

change_stateMethod · 0.80

Calls 1

get_safe_tokenMethod · 0.80

Tested by

no test coverage detected