code: func unquoteString(s string) (string, error) {
  	n := len(s)
  	if n < 2 {
  		return "", errors.New("too short a string")
  	}
  
  	if '\'' != s[0] || '\'' != s[n-1] {
  		return "", errors.New("string not surrounded by quotes")
  	}
  
  	s = s[1 : n-1]
  	if !contains(s, '\\') && !contains(s, '\'') {
  		return s, nil
  	}
  
  	var escaping = false
  	var result = make([]rune, 0, len(s))
  	for i := 0; i < len(s); {
  		r, size := utf8.DecodeRuneInString(s[i:])
  		i += size
  
  		if escaping {
  			if r == 'u' {
  				if i+4 > len(s) {
  					return "", errors.New("error scanning unicode escape, expect \\uNNNN")
  				}
  				num, err := strconv.ParseInt(s[i:i+4], 16, 0)
  				if err != nil {
  					return "", err
  				}
  				r = rune(num)
  				i += 4
  			} else {
  				replacement, ok := unescapes[r]
  				if !ok {
  					return "", errors.New("unrecognized escape code: \\" + s[i:i+1])
  				}
  				r = rune(replacement)
  			}
  		}
  
  		escaping = ((r == '\\') && !escaping)
  		if !escaping {
  			result = append(result, r)
  		}
  	}
  	return string(result), nil
  }
docs: // unquoteString takes a quoted soy string (including the surrounding quotes)
  // and returns the unquoted string, along with any error encountered.