You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let s = "abcd";letmut cursor = GraphemeCursor::new(3, s.len(),false);assert_eq!(cursor.prev_boundary(&s[2..],2),Err(GraphemeIncomplete::PrevChunk));assert_eq!(cursor.prev_boundary(&s[..2],0),Ok(Some(2)));
On the second assertion, it instead returns Err(GraphemeIncomplete::InvalidOffset). If it starts from position 4, as is written in the doc comment, it works. However it does not work when the cursor position starts from 3.
The text was updated successfully, but these errors were encountered:
jmuk
added a commit
to jmuk/unicode-segmentation
that referenced
this issue
Mar 16, 2018
I got a sample code:
On the second assertion, it instead returns
Err(GraphemeIncomplete::InvalidOffset)
. If it starts from position 4, as is written in the doc comment, it works. However it does not work when the cursor position starts from 3.The text was updated successfully, but these errors were encountered: