On Fri, Apr 02, 2021 at 05:05:21AM +0000, mw via Digitalmars-d-learn wrote:
[...]
> This is just an example, what if the exact length is not known
> statically, is there a functions to trim the `\0`s?

What about `s.until('\0')`?

Example:

        auto s = "abc\0\0\0def";
        auto t = "blah" ~ s.until('\0').array ~ "boo";


T

-- 
What do you call optometrist jokes? Vitreous humor.

Reply via email to