package helpers

import 

func ( rune, ,  rune) bool {
	if  >  {
		return false
	}
	if  >=  {
		return true
	}
	return false
}

// According to UTS#18 Unicode Regular Expressions (http://www.unicode.org/reports/tr18/)
// RL 1.4 Simple Word Boundaries  The class of <word_character> includes all Alphabetic
// values from the Unicode character database, from UnicodeData.txt [UData], plus the U+200C
// ZERO WIDTH NON-JOINER and U+200D ZERO WIDTH JOINER.
func ( rune) bool {
	// matches charclass.go

	//TODO: add optimization here for ascii

	//"L", "Mn", "Nd", "Pc"
	return unicode.In(,
		unicode.Categories["L"], unicode.Categories["Mn"],
		unicode.Categories["Nd"], unicode.Categories["Pc"]) ||  == '\u200D' ||  == '\u200C'
	//return 'A' <= r && r <= 'Z' || 'a' <= r && r <= 'z' || '0' <= r && r <= '9' || r == '_'
}

func ( rune,  uint32) bool {
	//BDFHJLNPRTVX = 10101010 10101010 10101010 00000000
	//B            = 00000000 00000000 00000000 01000010
	//char=B-B     = 00000000 00000000 00000000 00000000
	//BDFH.. << 0  = 10101010 10101010 10101010 00000000
	//char-32      = 11111111 11111111 11111111 11100000
	//&            = 10101010 10101010 10101010 00000000
	// first bit is 1 then negative, so it matches

	//charMinusLowUInt32 := int32(ch - low)
	return int32((<<uint16())&uint32(-32)) < 0
}

func ( rune,  uint64) bool {
	//64-bit version of the above
	//charMinusLowUInt64 := int64(ch - low)
	return int64((<<uint32())&uint64(-64)) < 0
}

func ( rune,  uint64,  uint64) bool {
	if  < 64 {
		return &(1<<uint()) != 0
	}
	if  < 128 {
		return &(1<<uint(-64)) != 0
	}
	return false
}