Re: How to find the right function in the Phobos library?

2024-08-17 Thread Renato Athaydes via Digitalmars-d-learn
On Saturday, 17 August 2024 at 05:28:37 UTC, Bruce wrote: Surely D must be an indexOf function that works on arrays? Something like... string[] arr = ["pa", "db", "wb", "ha", "wa"]; int i = arr.indexOf("ha"); But, this is not satisfying. The Phobos library should have this function. I've no

Re: create fixed length string of characters

2024-08-17 Thread IchorDev via Digitalmars-d-learn
On Saturday, 17 August 2024 at 06:03:09 UTC, Bruce wrote: Is there anything wrong with using the char[60] directly? In this case it’s fine to.

Re: How to find the right function in the Phobos library?

2024-08-17 Thread Lance Bachmeier via Digitalmars-d-learn
On Saturday, 17 August 2024 at 05:28:37 UTC, Bruce wrote: This seems to work but now I'm concerned. Why was it so hard to find? What is the best way to search for a function in the Phobos library? Browsing the Phobos index will often do the trick, as will searching in the forum using the box

Re: How to find the right function in the Phobos library?

2024-08-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 17 August 2024 at 05:28:37 UTC, Bruce wrote: What is the best way to search for a function in the Phobos library? Go to dlang.org, select dicumentation, then library reference. Pick any module, click on it In the upper right, switch the docs from stable to ddox Now you can use

Re: How to find the right function in the Phobos library?

2024-08-17 Thread Vinod K Chandran via Digitalmars-d-learn
On Saturday, 17 August 2024 at 17:31:53 UTC, Steven Schveighoffer wrote: Go to dlang.org, select dicumentation, then library reference. Pick any module, click on it In the upper right, switch the docs from stable to ddox Now you can use the search bar and it is interactive. Typing in indexOf

Re: How to find the right function in the Phobos library?

2024-08-17 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 18/08/2024 7:49 AM, Vinod K Chandran wrote: On Saturday, 17 August 2024 at 17:31:53 UTC, Steven Schveighoffer wrote: Go to dlang.org, select dicumentation, then library reference. Pick any module, click on it In the upper right, switch the docs from stable to ddox Now you can use the se