-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(command): Add new split command for strings (#258)
* feat(command): Add new split command for strings * fix(command): Add split command in index * fix(command): Split command: Missing typeof causing arguments to not be seen as strings --------- Co-authored-by: Liana <[email protected]>
- Loading branch information
1 parent
511eae3
commit fa1a823
Showing
4 changed files
with
33 additions
and
0 deletions.
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
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 @@ | ||
# Split | ||
|
||
The `split` command splits strings into arrays: | ||
|
||
Syntax: `split [splitter] [string]` | ||
|
||
Example: | ||
|
||
```narrat | ||
main: | ||
var arr (split " " "Hello world") // arr = ["Hello", "world"] | ||
var arr1 (split "" "Hello world") // arr1 = [ "H", "e", "l", "l", "o", " ", "w", "o", "r", "l", "d"] | ||
``` |
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
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