parseAson

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 after every tag.

  1. void parseAson(AsonOptions options, string sdl)
  2. void parseAson(AsonOptions options, char[] sdlText)
    void
    parseAson

Parameters

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: void

true if a tag was found, false otherwise

Throws

AsonParseException or Utf8Exception

Meta