-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
letters = "ABC" | ||
|
||
split letters into middle with "B" ( -> "A", "C" ) | ||
say middle at 0 | ||
say middle at 1 | ||
say middle at 2 | ||
|
||
split letters into start with "A" ( -> "", "BC" ) | ||
say start at 0 | ||
say start at 1 | ||
say start at 2 | ||
|
||
split letters into end with "C" ( -> "AB" ) ( expected "AB", "") | ||
say end at 0 | ||
say end at 1 | ||
say end at 2 | ||
|
||
split letters into nosep with "" | ||
say nosep at 0 | ||
say nosep at 1 | ||
say nosep at 2 | ||
say nosep at 3 | ||
|
13 changes: 13 additions & 0 deletions
13
programs/tests/fixtures/arrays/split_delimiters_more.rock.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
A | ||
C | ||
mysterious | ||
|
||
BC | ||
mysterious | ||
AB | ||
|
||
mysterious | ||
A | ||
B | ||
C | ||
mysterious |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters