parseSdlTag

Parses one SDL tag (not including its children) from sdlText saving slices for every name/value/attribute to the given tag struct. This function assumes that sdlText contains at least one full SDL _tag. The only time this function will allocate memory is if the value/attribute appenders in the tag struct are not large enough to hold all the values. Because of this, after the tag values/attributes are populated, it is up to the caller to copy any memory they wish to save unless sdlText is going to persist in memory. Note: this function does not handle the UTF-8 bom because it doesn't make sense to re-check for the BOM before every tag.

bool
parseSdlTag
(,
char[]* sdlText
)

Parameters

tag Tag*

An address to a Tag structure to save the sdl tag's name/values/attributes.

sdlText char[]*

An address to the sdl text character array. the function will move the front of the slice foward past any sdl that was parsed.

Return Value

Type: bool

true if a tag was found, false otherwise

Throws

SdlParseException or Utf8Exception

Meta