Ouzo\Utilities\Strings::appendPrefix PHP 메소드

appendPrefix() 공개 정적인 메소드

Example: $string = 'Targaryen'; $stringWithPrefix = Strings::appendPrefix($string, 'Daenerys '); Result: Daenerys Targaryen
public static appendPrefix ( string $string, string $prefix = '' ) : string
$string string
$prefix string
리턴 string
    public static function appendPrefix($string, $prefix = '')
    {
        if (is_null($string)) {
            return null;
        }
        return $prefix . $string;
    }

Usage Example

예제 #1
0
 public static function getMessageWithHttpProtocol($code, $protocol = 'HTTP/1.1 ')
 {
     return Strings::appendPrefix(self::getMessage($code), $protocol);
 }
All Usage Examples Of Ouzo\Utilities\Strings::appendPrefix