Defined in header <cparse/Cursor.hh>
unsigned long int getColumnNumber() const noexcept;
Returns the one-based column number of the last character consumed via get() or safeGet(). Returns 0 before any character has been read.
Parameters
None.
Return value
The current column number, one-based. 0 if no character has been consumed yet.
Exceptions
noexcept.
Notes
The column counter is set to 1 on the read that starts a new line (the first read after a newline character was consumed). Peeks do not advance it.
Column numbers count bytes, not glyphs. For text containing multi-byte UTF-8 sequences, the reported column is the byte offset within the line, not the visual column. cparse does not attempt any grapheme or codepoint awareness.
See also
- Cursor::getLineNumber — companion line value.
- Cursor::getFilename — file for the position.
- Parser::recordError — reads line/column into ParseError.

