Sign in
bazel
/
bazel
/
19737b8af1d21747f21bf3c1b63029f0ad60d344
/
.
/
src
/
test
/
starlark
/
testdata
/
string_elems.sky
blob: 192d88bf93a3b3c8fdd9506b81f46e36cf8269c0 [
file
] [
log
] [
blame
]
# string.elems
assert_eq
(
list
(
"abcd"
.
elems
()),
[
"a"
,
"b"
,
"c"
,
"d"
])
assert_eq
(
len
(
"aaa"
.
elems
()),
3
)
def
test_iter
():
i
=
0
for
c
in
"abcd"
.
elems
():
assert_eq
(
c
,
"abcd"
[
i
])
i
+=
1
assert_eq
(
i
,
4
)
test_iter
()