annotations v0.1.0 Annotations.AnnotatedString
Link to this section Summary
Functions
Tests whether the annotations in the AnnotatedString are disjoint.
consider can be any of the values allowed by Annotations.List.disjoint?/2
Joins the given enumerable into a binary using joiner as a separator
splits the Annotated string in two. Each String keeps the Annotations referring to itsaelf. Annotations spanning split boundaries are duplicated to each neighboring chunk
Splits a AnnotatedString at any point within an annotation. fun is a fn str, ann-> nil|:before|:after|integer, where integer is between ann.from and ann.to
splits the string at the before or after annotations tagged with any tag in tags
options: split: (:before | :after)
For a general function for splitting based on Annotations look at split_by_annotation/3
Link to this section Functions
Tests whether the annotations in the AnnotatedString are disjoint.
consider can be any of the values allowed by Annotations.List.disjoint?/2
Joins the given enumerable into a binary using joiner as a separator.
If joiner is not passed at all, it defaults to %AnnotatedString(“ “, Annotation.new(0, 1, :joiner)).
All items in the enumerable and the joiner must be AnnotatedStrings or Strings, otherwise an error is raised.
splits the Annotated string in two. Each String keeps the Annotations referring to itsaelf. Annotations spanning split boundaries are duplicated to each neighboring chunk
Splits a AnnotatedString at any point within an annotation. fun is a fn str, ann-> nil|:before|:after|integer, where integer is between ann.from and ann.to
splits the string at the before or after annotations tagged with any tag in tags
options: split: (:before | :after)
For a general function for splitting based on Annotations look at split_by_annotation/3