some love for std.string

many functions of std.string had no attributes like pure, safe etc.
additionally, many const arguments where not marked as const.
tabs -> whitespace
removed tail whitespace
Doc Examples to unittest docs
I'm unsure about the necessity of putting `const` on by-value parameters, but if we're going to do that, maybe `in` is better (expresses intent more clearly)?