MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / column

Method column

eval/public/source_position.cc:53–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53int32_t SourcePosition::column() const {
54 int32_t position = character_offset();
55 std::pair<int, int32_t> line_and_offset =
56 GetLineAndLineOffset(source_info_, position);
57 return 1 + (position - line_and_offset.second);
58}
59
60int32_t SourcePosition::character_offset() const {
61 if (source_info_ == nullptr) {

Callers 1

TEST_FFunction · 0.80

Calls 1

GetLineAndLineOffsetFunction · 0.85

Tested by 1

TEST_FFunction · 0.64