Skip to main content

at_pos

Macro at_pos 

Source
macro_rules! at_pos {
    ($doc:expr, $pos:expr, insert $text:expr) => { ... };
    ($doc:expr, $pos:expr, replace $len:expr, $text:expr) => { ... };
    ($doc:expr, $pos:expr, delete $len:expr) => { ... };
}
Expand description

Fluent API macro for position operations

ยงExamples

use ass_editor::{EditorDocument, Position, at_pos};

let mut doc = EditorDocument::from_content("Hello world!").unwrap();

// Note: at_pos! macro doesn't exist in the current implementation
// Using direct methods instead
doc.insert(Position::new(5), " beautiful").unwrap();
assert_eq!(doc.text(), "Hello beautiful world!");