Skip to content

Commit 2ecf87d

Browse files
author
Geoffrey Broadwell
committed
Fix an incorrect example and a whitespace error in Str.pod
1 parent 15eeda8 commit 2ecf87d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Str.pod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Examples:
139139
say index "Camelia is a butterfly", "Camel"; # 0
140140
say index "Camelia is a butterfly", "Onion"; # Int()
141141
142-
say index("Camelia is a butterfly", "Onion") ?? 'OK' !! 'NOT'; # NOT
142+
say index("Camelia is a butterfly", "Onion").defined ?? 'OK' !! 'NOT'; # NOT
143143
144144
=head2 rindex
145145
@@ -218,8 +218,7 @@ Examples:
218218
lines("a\nb").perl; # ("a", "b").list
219219
lines("a\nb").elems; # 2
220220
"a\nb".lines.elems; # 2
221-
222-
"a\n".lines.elems; # 1
221+
"a\n".lines.elems; # 1
223222
224223
=head2 words
225224

0 commit comments

Comments
 (0)