mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-16 07:40:44 -07:00
15 lines
234 B
Go
15 lines
234 B
Go
package main
|
|
|
|
func IndexOf(candidate string, arr []string) int {
|
|
for index, element := range arr {
|
|
if element == candidate {
|
|
return index
|
|
}
|
|
}
|
|
return -1
|
|
}
|
|
|
|
func SetTermTitle(title string) {
|
|
print("\033]0;", title, "\007")
|
|
}
|