BloombergLP::bdlde::Utf8Util::getLineAndColumnNumber

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);
» more...

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);
» more...

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
lineNumberreceives the 1-based line number of byteOffset
utf8Columnreceives the UTF-8 column within the line
startOfLineByteOffsetreceives the byte offset of the line start
inputstream buffer containing UTF-8 text
byteOffsetbyte offset whose line and column are requested
lineDelimetercharacter used to delimit lines