icingaweb2/library/Icinga/Util/String.php

25 lines
447 B
PHP

<?php
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Util;
/**
* Common string helper
*/
class String
{
/**
* Split string into an array and trim spaces
*
* @param string $value
* @param string $delimiter
*
* @return array
*/
public static function trimSplit($value, $delimiter = ',')
{
return array_map('trim', explode($delimiter, $value));
}
}