1 // Copyright 2009, 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 #define charntorune(pv, str, len) __go_get_rune(str, len, pv)
14 func stringiter(s String, k int32) (retk int32) {
18 // retk=0 is end of iteration
30 n = charntorune(&l, s.__data+k, s.__length-k);
31 retk = k + (n ? n : 1);
36 func stringiter2(s String, k int32) (retk int32, retv int32) {
40 // retk=0 is end of iteration
53 n = charntorune(&retv, s.__data+k, s.__length-k);
54 retk = k + (n ? n : 1);