Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gap-buffer-rust

Build & Test

A simple gap buffer implementation in Rust.

# You can just add it to Cargo.toml as such:
[dependencies]
gap_buffer = { git = "https://github.com/andrejfox/gap-buffer-rust.git" }

Features

  • Insert
  • Delete
  • Backspace
  • Cursor movement
  • Efficient editing near the cursor

Example

use gap_buffer::GapBuffer;

let mut buf = GapBuffer::new("hello");
buf.move_cursor(5).unwrap();
buf.insert(" world");

assert_eq!(buf.fetch(0, 10).unwrap(), "hello world");

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages