Improve several string operations

The idea is to avoid needless memory allocations, also some unrealated fixups.

Merge request reports

Loading