Skip to content
KvConfigSkipLine

KvConfigSkipLine

KvConfigSkipLine

Description

Skip current line including trailing newline when present.

Parameters

Name Direction Description
si in Iterator positioned anywhere on a line.

Success

Returns iterator positioned at the first character of the next line.

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    StrIter KvConfigSkipLine(StrIter si) {
        while (StrIterRemainingLength(&si) && !kvconfig_is_line_end(StrIterPeek(&si))) {
            StrIterNext(&si);
        si = KvConfigSkipWhitespace(si);
        if (kvconfig_is_comment_start(StrIterPeek(&si))) {
            si = KvConfigSkipLine(si);
        } else if (!kvconfig_is_line_end(StrIterPeek(&si))) {
            LOG_ERROR("Unexpected trailing characters after config value");
    
            if (kvconfig_is_comment_start(StrIterPeek(&si))) {
                si = KvConfigSkipLine(si);
                continue;
            }
Last updated on