Use 'w' instead of deprecated 'safe'
A few more string API methods.