-
-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
chop
function for chopping iso
Strings and Arrays
This commit adds a `chop` function to both String and Array that works on an `iso` and chops it in two with the left half being a new `iso` String/Array reusing the same pointer and the right half being a `trim_in_place` version of the original String/Array. Both are returned as `iso` and mutable and do not share any memory. The operation does not allocate a new pointer nor copy elements allowing for efficiency.
- Loading branch information
Showing
3 changed files
with
104 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
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