Cogs.Core
Public Attributes | List of all members
GumboStringPiece Struct Reference

#include <gumbo.h>

Public Attributes

const char * data
 
size_t length
 

Detailed Description

A struct representing a string or part of a string. Strings within the parser are represented by a char* and a length; the char* points into an existing data buffer owned by some other code (often the original input). GumboStringPieces are assumed (by convention) to be immutable, because they may share data. Use GumboStringBuffer if you need to construct a string. Clients should assume that it is not NUL-terminated, and should always use explicit lengths when manipulating them.

Definition at line 90 of file gumbo.h.

Member Data Documentation

◆ data

const char* GumboStringPiece::data

A pointer to the beginning of the string. NULL iff length == 0.

Definition at line 92 of file gumbo.h.

◆ length

size_t GumboStringPiece::length

The length of the string fragment, in bytes. May be zero.

Definition at line 95 of file gumbo.h.


The documentation for this struct was generated from the following file: