Re: std.int128

2025-05-09 Thread Pete Padil via Digitalmars-d-learn
On Friday, 9 May 2025 at 10:56:00 UTC, Bastiaan Veelo wrote: On Wednesday, 7 May 2025 at 00:40:04 UTC, Pete Padil wrote: Why is std.int128 not listed when using the top Phobos Doc page (link "Documentation>Library Reference")? I can find it if I expand the "Library" link at the top of the Pho

Re: std.algorithm.strip functionality

2025-05-06 Thread Pete Padil via Digitalmars-d-learn
On Wednesday, 7 May 2025 at 01:40:33 UTC, Jonathan M Davis wrote: On Tuesday, May 6, 2025 3:19:29 PM Mountain Daylight Time Pete Padil via Digitalmars-d-learn wrote: [...] strip removes the requested elements from the ends (whereas stripLeft does it from the front of the range, and

std.int128

2025-05-06 Thread Pete Padil via Digitalmars-d-learn
Why is std.int128 not listed when using the top Phobos Doc page (link "Documentation>Library Reference")? I can find it if I expand the "Library" link at the top of the Phobos page. Just thought I mention it. Regards

Re: std.algorithm.strip functionality

2025-05-06 Thread Pete Padil via Digitalmars-d-learn
On Tuesday, 6 May 2025 at 21:54:31 UTC, monkyyy wrote: On Tuesday, 6 May 2025 at 21:19:29 UTC, Pete Padil wrote: I compiled and ran the following test program: ```d import std.stdio, std.algorithm; void main() { long[] a = [1, 2, 3, 15, 4]; auto b = a[].strip(15); writeln(a); writel

std.algorithm.strip functionality

2025-05-06 Thread Pete Padil via Digitalmars-d-learn
I compiled and ran the following test program: ```d import std.stdio, std.algorithm; void main() { long[] a = [1, 2, 3, 15, 4]; auto b = a[].strip(15); writeln(a); writeln(b); } ``` I get: [1, 2, 3, 15, 4] [1, 2, 3, 15, 4] It did not remove 15, it does work if 15 is at the beginning o

Re: rbtree to array?

2025-05-06 Thread Pete Padil via Digitalmars-d-learn
On Tuesday, 6 May 2025 at 06:50:36 UTC, Ferhat Kurtulmuş wrote: Rbtree has a range interface of d. Its memory layout is similar to a linked list, where the data is not contiguous. So, you have to copy the elements manually. But it is always a nice practice to use library functions, doing it for

rbtree to array?

2025-05-05 Thread Pete Padil via Digitalmars-d-learn
Was wondering if there is a way to get the data inside an rbtree as a simple array or a std.array, besides manually copying? Apologies if the answer is obvious and I missed it.