$string = 'Targaryen'; $stringWithPrefix = Strings::appendPrefix($string, 'Daenerys ');
Daenerys Targaryen
public static function getMessageWithHttpProtocol($code, $protocol = 'HTTP/1.1 ') { return Strings::appendPrefix(self::getMessage($code), $protocol); }
/** * @test */ public function shouldAppendPrefix() { //given $string = 'Targaryen'; //when $stringWithSuffix = Strings::appendPrefix($string, 'Daenerys '); //then $this->assertEquals('Daenerys Targaryen', $stringWithSuffix); }
public static function createModule($moduleName) { $moduleName = ucfirst(Inflector::singularize($moduleName)); $moduleName = Strings::appendPrefix($moduleName, '\\SugarClient\\Module\\'); return new $moduleName(); }