> Is strlen the proc c_strlen in std/segfaults? If so, how do you use it?

I believe it's just `.len` overloaded for an object of type `cstring`.

Distinct types pretend to be a completely new type--you have to take extra 
steps to allow those old behaviors back in to the new type. You can also 
typecast back to the backing type for free (ex `cast[cstring](protected).len`.) 
Such is also one way to get around your copy constructors. You would need to 
typecast to the backing type--which does not have these copy triggers--and then 
back to the protected type to return it.

I've tried abusing =copy and such for pointer trickery in the past (`in my 
postbox repo <https://git.sr.ht/~icedquinn/icedpostbox>`) and it was kind of a 
pain. I don't think I would do so again without a real need (like profiling 
showing you are copying strings back and forth too much, or if you absolutely 
need a parallel reference tracer for keeping game textures loaded or such.)

Reply via email to