Always std.utf.validate, or rely on exceptions?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 2 08:24:31 PST 2017


SimonN wrote:

> Should I always validate text from files manually with std.utf.validate?
>
> Or should I memorize which functions throw, then validate manually 
> whenever I call the non-throwing UTF functions? What is the pattern 
> behind what throws and what asserts false?

i'd say: "ALWAYS validate before ANY further processing".


More information about the Digitalmars-d-learn mailing list