NewTextSourceWithLimit creates a new Source from the input text string while enforcing a maximum code point count when needed.
(text string, limit int)
| 77 | // NewTextSourceWithLimit creates a new Source from the input text string while |
| 78 | // enforcing a maximum code point count when needed. |
| 79 | func NewTextSourceWithLimit(text string, limit int) (Source, error) { |
| 80 | return NewStringSourceWithLimit(text, "<input>", limit) |
| 81 | } |
| 82 | |
| 83 | // NewStringSource creates a new Source from the given contents and description. |
| 84 | func NewStringSource(contents string, description string) Source { |