Replaces deprecated StringUtil method