aboutsummaryrefslogtreecommitdiffhomepage
path: root/compiler/testdata/string.go
blob: 3c574d8fd3f86018892699627b8652dbc8e42ee6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main

func stringLen(s string) int {
	return len(s)
}

func stringIndex(s string, index int) byte {
	return s[index]
}

func stringCompareEqual(s1, s2 string) bool {
	return s1 == s2
}

func stringCompareUnequal(s1, s2 string) bool {
	return s1 != s2
}

func stringCompareLarger(s1, s2 string) bool {
	return s1 > s2
}