Quick Links:

bal | bbl | bdl | bsl

Public Types | Static Public Member Functions

bdlde::Utf8Util_ImpUtil Struct Reference

#include <bdlde_utf8util.h>

List of all members.

Public Types

typedef bsls::Types::Uint64 Uint64

Static Public Member Functions

static int getLineAndColumnNumber (Uint64 *lineNumber, Uint64 *utf8Column, Uint64 *startOfLineByteOffset, bsl::streambuf *input, Uint64 byteOffset, char lineDelimeter, char *temporaryReadBuffer, int temporaryReadBufferNumBytes)

Detailed Description

[!PRIVATE!] This struct provides a namespace for static methods used to implement Utf8Util. Note that the functions are not typically useful for clients, and are primarily exposed to allow for more thorough testing.

See Component bdlde_utf8util


Member Typedef Documentation


Member Function Documentation

static int bdlde::Utf8Util_ImpUtil::getLineAndColumnNumber ( Uint64 lineNumber,
Uint64 utf8Column,
Uint64 startOfLineByteOffset,
bsl::streambuf *  input,
Uint64  byteOffset,
char  lineDelimeter,
char *  temporaryReadBuffer,
int  temporaryReadBufferNumBytes 
) [static]

For the specified byteOffset in the specified input, load the byte offset's line number into the specified lineNumber, the column number into the specified utf8Column, and the byte offset for the start of the line into the specified startOfLineByteOffset, using the specified lineDelimeter as the line separator, and using the specified temporaryReadBuffer (of the specified length temporaryReadBufferNumBytes) as a temporary buffer for reading. Return 0 on success, or a non-zero value if location cannot be found in input or if input contains non-UTF-8 characters. The utf8Column is the number of UTF-8 code points between startOfLineByteOffset and byteOffset. The behavior is undefined unless temporaryReadBuffer refers to a valid buffer of at least temporaryReadBufferNumBytes bytes, and temporaryReadBufferNumBytes is greater than or equal to 4.


The documentation for this struct was generated from the following file: