MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / getIndex

Function getIndex

cipher/transposition/transposition.go:43–51  ·  view source on GitHub ↗
(wordSet []rune, subString rune)

Source from the content-addressed store, hash-verified

41}
42
43func getIndex(wordSet []rune, subString rune) int {
44 n := len(wordSet)
45 for i := 0; i < n; i++ {
46 if wordSet[i] == subString {
47 return i
48 }
49 }
50 return 0
51}
52
53func Encrypt(text []rune, keyWord string) ([]rune, error) {
54 key := getKey(keyWord)

Callers 1

getKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected