MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / replace_all_same_length

Function replace_all_same_length

rust/stringzilla.rs:3966–3971  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3964
3965 #[test]
3966 fn replace_all_same_length() {
3967 let mut buffer = b"abcabc".to_vec();
3968 let replaced = sz::try_replace_all(&mut buffer, b"ab", b"XY").unwrap();
3969 assert_eq!(replaced, 2);
3970 assert_eq!(buffer, b"XYcXYc");
3971 }
3972
3973 #[test]
3974 fn replace_all_shrinks() {

Callers

nothing calls this directly

Calls 1

try_replace_allFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…