SearchCode: Added a function for header formatting.

It's a formatting function from the old spice.js file.