ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
StringUtil.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Dflydev\FigCookies;
4 
5 class StringUtil
6 {
7  public static function splitOnAttributeDelimiter($string)
8  {
9  return array_filter(preg_split('@\s*[;]\s*@', $string));
10  }
11 
12  public static function splitCookiePair($string)
13  {
14  $pairParts = explode('=', $string, 2);
15 
16  if (count($pairParts) === 1) {
17  $pairParts[1] = '';
18  }
19 
20  return array_map(function ($part) {
21  return urldecode($part);
22  }, $pairParts);
23  }
24 }
static splitOnAttributeDelimiter($string)
Definition: StringUtil.php:7
static splitCookiePair($string)
Definition: StringUtil.php:12