_jsonContextWindow
private fn
string _jsonContextWindow(const(char)[] src, size_t index, size_t context = 30) @safeBuild a context window for diagnostics.
The returned string contains a single-line excerpt (roughly context characters to each side) and a caret line highlighting index.
Parameters
src | The source input buffer. |
index | The 0-based byte offset to highlight. |
context | Number of characters to show on each side of the error position. |
Returns
A string containing the source excerpt and a caret line.