/*
ocr := OcrItems{}
m := ocr.New().Getitems(jsonS)
*/
type OcrItems struct {
	items string
	i     int
	m     map[int]string
}

func (this *OcrItems) New() *OcrItems {
	this.items = ""
	this.i = 0
	this.m = make(map[int]string)
	return this
}

func (this *OcrItems) Getitems(str string) map[int]string {
	start := -1
	end := 0
	this.items = str
	if strings.Index(this.items, "itemstring") != -1 {
		start = strings.Index(this.items, "itemstring") + 12
		this.items = this.items[start:]
		end = strings.Index(this.items, ",")
		this.m[this.i] = this.items[0:end]
		this.items = this.items[end+1:]
		this.i++
		this.Getitems(this.items)
	}
	return this.m
}
