On Monday, 11 January 2021 at 16:41:03 UTC, oddp wrote:
On 11.01.21 16:45, Marcone via Digitalmars-d-learn wrote:
"Hello World"[0..?.indexOf("o")]

Does until [1] do the trick?

"Hello World".until("o") // => "Hell"

[1] https://dlang.org/library/std/algorithm/searching/until.html

I want more support inside slice []

Reply via email to