const TOK_START
pub const TOK_START = 1Purpose
Constant TOK_START, defining protocol or algorithm parameters.
#encoding/xmlText escape and Decoder.token. No reflection unmarshal.
const TOK_STARTpub const TOK_START = 1Constant TOK_START, defining protocol or algorithm parameters.
const TOK_ENDpub const TOK_END = 2Constant TOK_END, defining protocol or algorithm parameters.
const TOK_CHARpub const TOK_CHAR = 3Constant TOK_CHAR, defining protocol or algorithm parameters.
const TOK_COMMENTpub const TOK_COMMENT = 4Constant TOK_COMMENT, defining protocol or algorithm parameters.
struct Tokenpub struct Token {
pub kind int
pub name string
pub text string
pub keys []string
pub vals []string
}Structure encapsulating kind, name, text, keys, vals.
kind intname stringtext stringkeys []stringvals []stringstruct Decoderpub struct Decoder {
pub data string
pub pos int
pub pending_end string
}Structure encapsulating data, pos, pending_end.
data stringpos intpending_end stringnew_decoderpub fn new_decoder(src &string) DecoderConstruct decoder.
src &stringDecoder — a value of this type
(Decoder) input_offsetpub fn (d Decoder) input_offset() intOperation on Decoder: input offset.
d DecoderDecoder instance used by this call (value receiver).int — a value of this type
escape_textpub fn escape_text(s &string) stringEscape text.
s &stringstring — result string
escape_stringpub fn escape_string(s &string) stringEscape special characters.
s &stringstring — result string
unescape_stringpub fn unescape_string(s &string) stringUnescape escaped entity or character sequences.
s &stringstring — result string
($&Decoder) tokenpub fn (d $&Decoder) token() TokenExecute token on $&Decoder. Throws on failure; handle the error or propagate it to the caller.
d $&DecoderDecoder instance used by this call (exclusive borrow).Token — a value of this type
($&Decoder) skippub fn (d $&Decoder) skip() intExecute skip on $&Decoder. Throws on failure; handle the error or propagate it to the caller.
d $&DecoderDecoder instance used by this call (exclusive borrow).int — a value of this type