MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / old_content_in_range

Method old_content_in_range

atomic-core/src/diff/word.rs:422–428  ·  view source on GitHub ↗

Get the concatenated content of old tokens in a range.

(&self, range: &Range<usize>)

Source from the content-addressed store, hash-verified

420
421 /// Get the concatenated content of old tokens in a range.
422 pub fn old_content_in_range(&self, range: &Range<usize>) -> String {
423 self.old_tokens[range.clone()]
424 .iter()
425 .map(|t| t.as_str())
426 .collect::<Vec<_>>()
427 .concat()
428 }
429
430 /// Get the concatenated content of new tokens in a range.
431 pub fn new_content_in_range(&self, range: &Range<usize>) -> String {

Callers 1

Calls 4

concatMethod · 0.80
iterMethod · 0.45
cloneMethod · 0.45
as_strMethod · 0.45

Tested by 1