add string helper and fixed for php 5.5.