MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / csvCell

Function csvCell

app/src/DataModel/Importers/ModbusMapImporter.cpp:174–180  ·  view source on GitHub ↗

* @brief Returns the trimmed/unquoted value at column index, or fallback when out of range. */

Source from the content-addressed store, hash-verified

172 * @brief Returns the trimmed/unquoted value at column index, or fallback when out of range.
173 */
174[[nodiscard]] static QString csvCell(const QStringList& cols, int colIndex, const QString& fallback)
175{
176 if (colIndex < 0 || colIndex >= cols.count())
177 return fallback;
178
179 return cols[colIndex].trimmed().remove('"');
180}
181
182/**
183 * @brief Returns a numeric cell value, falling back when missing or empty.

Callers 1

parseCsvRowFunction · 0.85

Calls 2

countMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected