aboutsummaryrefslogtreecommitdiff
path: root/strlen.lang
blob: 27c23a3eb70a4be0835fcf0329bd59d8d0bcdbd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
func int strlen(char[] str) {
	int i := 0;
	char c := str[i];
	while (c != '\0') {
		i = i + 1;
		c = str[i];
	}
	return i;
}

func int main() {return 0;}