package strutil

// ChopLineEnding removes a line ending ("\r\n" or "\n") from the end of s. It
// returns itself if it doesn't end with a line ending.
func ( string) string {
	if len() >= 2 && [len()-2:] == "\r\n" {
		return [:len()-2]
	} else if len() >= 1 && [len()-1] == '\n' {
		return [:len()-1]
	}
	return 
}