1 /* go-strslice.c -- the go string slice function.
3 Copyright 2009 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
13 __go_string_slice (String s
, intgo start
, intgo end
)
21 if (start
> len
|| end
< start
|| end
> len
)
22 runtime_panicstring ("string index out of bounds");
23 ret
.str
= s
.str
+ start
;
24 ret
.len
= end
- start
;