BloombergLP::bdlde::Utf8Util::getLineAndColumnNumber

Load line and column information for byteOffset in input.

Synopsis

Declared in <bdlde_utf8util.h>

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

Description

Same as the related overload above for getLineAndColumnNumber.

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