-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add strbasics.strip #16280
add strbasics.strip #16280
Conversation
I don't like the name too much and I dislike further strutils bloat. I do really like the code itself though. Not sure where we should put it though. |
then it's finally time for
note
|
I still don't see why we need to make a new module for this. Why not put it in Also, it's not obvious at all what |
see also #16280 (comment)
In the future PR, lots of things should be moved into
It is called
|
Name it |
What about... Splitting a tiny in-place efficient |
That's the plan, yes, but the focus on |
doAssertRaises(AssertionDefect): | ||
discard a.dup(setSlice(1 .. 11)) | ||
|
||
static: teststrip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/teststrip/main
(since it's testing other procs
@@ -76,6 +76,8 @@ | |||
- Added `euclDiv` and `euclMod` to `math`. | |||
- Added `httpcore.is1xx` and missing HTTP codes. | |||
|
|||
- Added `strip` and `setSlice` to `std/strbasics`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Added
std/strbasics
containingstrip
andsetSlice
.
else: | ||
# not JS and not Nimscript | ||
when not declared(moveMem): | ||
impl() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see whether we can use copyWithin
see developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin
(refs #16280 (comment))
Ref RFC timotheecour#422
future work
matrix: "c js"
passed CI (this shouldn't work, targets should be used); refs add strbasics.strip #16280 (comment)