lib.mx raw

   1  package lib
   2  
   3  type MW struct {
   4  	S string
   5  	I int32
   6  }
   7  
   8  func New(s string) (m MW) {
   9  	w := MW{S: s}
  10  	for w.I < len(s) && s[w.I] != '[' {
  11  		w.I++
  12  	}
  13  	if w.I < len(s) {
  14  		w.I++
  15  	}
  16  	return w
  17  }
  18  
  19  type Pair struct {
  20  	S string
  21  	I int32
  22  }
  23  
  24  func NewPair(s string) (m Pair) {
  25  	w := Pair{S: s}
  26  	w.I = 7
  27  	return w
  28  }
  29  
  30  type IntFirst struct {
  31  	I int32
  32  	S string
  33  }
  34  
  35  func NewIntFirst(s string) (m IntFirst) {
  36  	w := IntFirst{S: s}
  37  	w.I = 7
  38  	return w
  39  }
  40