Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/skia/skia/src/sksl/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 784 B image not shown  

Quelle  SkSLPosition.cpp   Sprache: C

 

/*
 * Copyright 2022 Google LLC
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


#include "src/sksl/SkSLPosition.h"

#include <algorithm>

namespace SkSL {

int Position::line(std::string_view source) const {
    SkASSERT(this->valid());
    if (fStartOffset == -1) {
        return -1;
    }
    if (!source.data()) {
        return -1;
    }
    // we allow the offset to equal the length, because that's where TK_END_OF_FILE is reported
    SkASSERT(fStartOffset <= (int)source.length());
    int offset = std::min(fStartOffset, (int)source.length());
    int line = 1;
    for (int i = 0; i < offset; i++) {
        if (source[i] == '\n') {
            ++line;
        }
    }
    return line;
}

} // namespace SkSL

Messung V0.5 in Prozent
C=92 H=88 G=89

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-09-30) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.