summaryrefslogtreecommitdiffstats
path: root/llgo/test/execution/strings/slice.go
blob: ec1b40ce719237463f7800b16dea929353cc1359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: llgo -o %t %s
// RUN: %t 2>&1 | FileCheck %s

// CHECK: abcdef
// CHECK-NEXT: bcdef
// CHECK-NEXT: abc
// CHECK-NEXT: bcd

package main

func main() {
	s := "abcdef"
	println(s[:])
	println(s[1:])
	println(s[:3])
	println(s[1:4])
}
OpenPOWER on IntegriCloud