Update string.js

Adds function support. Padding can now be a (non parameterized) function