## The challenge

Write a function named `first_non_repeating_letter` that takes a string input, and returns the first character that is not repeated anywhere in the string.

For example, if given the input `'stress'`, the function should return `'t'`, since the letter t only occurs once in the string, and occurs first in the string.

As an added challenge, upper- and lowercase letters are considered the same character, but the function should return the correct case for the initial letter. For example, the input `'sTreSS'` should return `'T'`.

If a string contains all repeating characters, it should return an empty string (`""`) or `None` — see sample tests.

## The solution in Golang

Option 1:

 `````` 1 2 3 4 5 6 7 8 9 10 11 12 `````` ``````package solution import ( "strings" ) func FirstNonRepeating(str string) string { for _, c := range str { if strings.Count(strings.ToLower(str), strings.ToLower(string(c))) < 2 { return string(c) } } return "" } ``````

Option 2:

 `````` 1 2 3 4 5 6 7 8 9 10 11 12 13 `````` ``````package solution func FirstNonRepeating(str string) string { seen := make(map[rune]int) for _, r := range str { seen[r|32]++ } for _, r := range str { if seen[r|32] == 1 { return string(r) } } return "" } ``````

Option 3:

 `````` 1 2 3 4 5 6 7 8 9 10 11 12 `````` ``````package solution import "strings" func FirstNonRepeating(str string) string { s := strings.ToLower(str) for i := 0; i < len(s); i++ { st := string(s[i]) if strings.Index(s, st) == strings.LastIndex(s, st) { return string(str[i]) } } return "" } ``````

## Test cases to validate our solution

 `````` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 `````` ``````package solution_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("Basic Tests", func() { It("should handle simple tests", func() { Expect(FirstNonRepeating("a")).To(Equal("a")) Expect(FirstNonRepeating("stress")).To(Equal("t")) Expect(FirstNonRepeating("moonmen")).To(Equal("e")) }) It("should handle empty strings", func() { Expect(FirstNonRepeating("")).To(Equal("")) }) It("should handle all repeating strings", func() { Expect(FirstNonRepeating("abba")).To(Equal("")) Expect(FirstNonRepeating("aa")).To(Equal("")) }) It("should handle odd characters", func() { Expect(FirstNonRepeating("~><#~><")).To(Equal("#")) Expect(FirstNonRepeating("hello world, eh?")).To(Equal("w")) }) It("should handle letter cases", func() { Expect(FirstNonRepeating("sTreSS")).To(Equal("T")) Expect(FirstNonRepeating("Go hang a salami, I'm a lasagna hog!")).To(Equal(",")) }) }) ``````