MAINT: core: string constants in static buffers

Saves copying them into temporary buffers.
Merge pull request #5175 from larsmans/c-fixes

MAINT: core: string constants in static buffers