Remove string dependancy

It's quite irritating to import the entire string package for one function. So I just copied the relevant function out of string and made it a private function in the AbstractWebApplication.php where it was being used. Code duplication yes - package dependency reduction benefit greater