Пример #1
0
func (x *Imp) Defined(t string) bool {
	//
	str.RemSpaces(&t)
	if str.Empty(t) {
		x.Clr()
		return true
	}
	for c := country(keineAngabe); c < noNations; c++ {
		x.cnt = c
		x.att = Folge[c]
		switch x.fmt {
		case Tld:
			if t == x.att.tld {
				return true
			}
		case Long:
			var p uint
			if str.IsPart(t, x.att.name, &p) && p == 0 {
				return true
			}
		default:
			return false
		}
	}
	return false
}
Пример #2
0
func aus(n, l, c uint, f, b col.Colour) {
	//
	N := files.NamePred(hasSuffix, n)
	var p uint
	if str.IsPart(ptSuffix, N, &p) {
		N = str.Part(N, 0, p)
	}
	bx.Colours(f, b)
	bx.Write(N, l, c)
}
Пример #3
0
func hasSuffix(a Any) bool {
	//
	var p uint
	return str.IsPart(ptSuffix, a.(string), &p) &&
		p == str.ProperLen(a.(string))-uint(len(ptSuffix))
}
Пример #4
0
func (x *Imp) IsPart(Y Object) bool {
	//
	var p uint
	return str.IsPart(x.content, x.imp(Y).content, &p)
}