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

Function rtrim

app/src/DataModel/Editors/CodeFormatter.cpp:530–538  ·  view source on GitHub ↗

* @brief Returns line stripped of trailing whitespace and any '\r' from CRLF normalization. */

Source from the content-addressed store, hash-verified

528 * @brief Returns line stripped of trailing whitespace and any '\r' from CRLF normalization.
529 */
530static QString rtrim(const QString& line)
531{
532 int end = line.size();
533 while (end > 0
534 && (line[end - 1] == QLatin1Char(' ') || line[end - 1] == QLatin1Char('\t')
535 || line[end - 1] == QLatin1Char('\r')))
536 --end;
537 return line.left(end);
538}
539
540/**
541 * @brief Returns the count of leading space/tab characters in the line.

Callers 2

scanAllLinesFunction · 0.85
reformatOneFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected