Load line and column information for byteOffset in input.

Synopses

Declared in <bdlde_utf8util.h>

Load line and column information for byteOffset in input.

static
int
getLineAndColumnNumber(
    Uint64* lineNumber,
    Uint64* utf8Column,
    Uint64* startOfLineByteOffset,
    std::streambuf* input,
    Uint64 byteOffset);

Load line and column information for byteOffset in input.

static
int
getLineAndColumnNumber(
    Uint64* lineNumber,
    Uint64* utf8Column,
    Uint64* startOfLineByteOffset,
    std::streambuf* input,
    Uint64 byteOffset,
    char lineDelimeter);

Return Value

0 on success, and a non‐zero value otherwise

Parameters

Name

Description

lineNumber

receives the 1‐based line number of byteOffset

utf8Column

receives the UTF‐8 column within the line

startOfLineByteOffset

receives the byte offset of the line start

input

stream buffer containing UTF‐8 text

byteOffset

byte offset whose line and column are requested

lineDelimeter

character used to delimit lines

Created with MrDocs