// Copyright (c) 2017, A. Stoewer <adrian.stoewer@rz.ifi.lmu.de>
// All rights reserved.

package strcase

// isLower checks if a character is lower case. More precisely it evaluates if it is
// in the range of ASCII character 'a' to 'z'.
func isLower( rune) bool {
	return  >= 'a' &&  <= 'z'
}

// toLower converts a character in the range of ASCII characters 'A' to 'Z' to its lower
// case counterpart. Other characters remain the same.
func toLower( rune) rune {
	if  >= 'A' &&  <= 'Z' {
		return  + 32
	}
	return 
}

// isLower checks if a character is upper case. More precisely it evaluates if it is
// in the range of ASCII characters 'A' to 'Z'.
func isUpper( rune) bool {
	return  >= 'A' &&  <= 'Z'
}

// toLower converts a character in the range of ASCII characters 'a' to 'z' to its lower
// case counterpart. Other characters remain the same.
func toUpper( rune) rune {
	if  >= 'a' &&  <= 'z' {
		return  - 32
	}
	return 
}

// isSpace checks if a character is some kind of whitespace.
func isSpace( rune) bool {
	return  == ' ' ||  == '\t' ||  == '\n' ||  == '\r'
}

// isDigit checks if a character is a digit. More precisely it evaluates if it is
// in the range of ASCII characters '0' to '9'.
func isDigit( rune) bool {
	return  >= '0' &&  <= '9'
}

// isDelimiter checks if a character is some kind of whitespace or '_' or '-'.
func isDelimiter( rune) bool {
	return  == '-' ||  == '_' || isSpace()
}

// iterFunc is a callback that is called fro a specific position in a string. Its arguments are the
// rune at the respective string position as well as the previous and the next rune. If curr is at the
// first position of the string prev is zero. If curr is at the end of the string next is zero.
type iterFunc func(prev, curr, next rune)

// stringIter iterates over a string, invoking the callback for every single rune in the string.
func stringIter( string,  iterFunc) {
	var  rune
	var  rune
	for ,  := range  {
		if  == 0 {
			 = 
			 = 
			continue
		}

		(, , )

		 = 
		 = 
	}

	if len() > 0 {
		(, , 0)
	}
}