Why isn't the method/constructor String(v::AbstractVector{UInt8}) actually called String!

I just got bitten by a bug that took a while to trace to the behavior of String(v::AbstractVector{UInt8})

which modified( or as the documentation says truncates) its input. Further reading brings me to believe that the other String Methods do not do this.

Which begs the question why isn’t this method renamed ‘String!’? This would make it consistent with the typical naming convention.

Forgive me if this has already been covered.

2 Likes

I think this is a valid point, I wondered about this too. (Perhaps change the category to Development?)

1 Like

I think this issue might be of relevance: https://github.com/JuliaLang/julia/issues/24388