Replace deprecated methods

Replace deprecated methods of StringUtil with their php internal equivalents.