Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Get string length
<?php mb_strlen(string $string, ?string $encoding = null): int
<?php private function getRepeatExpressionSpacing($events)
{
return $events->map(fn ($event) => mb_strlen($this->getRepeatExpression($event)))->max();
}
<?php }
}
$command = mb_strlen($command) > 1 ? "{$command} " : '';
$nextDueDateLabel = 'Next Due:';
<?php $hasMutex = $event->mutex->exists($event) ? 'Has Mutex › ' : '';
$dots = str_repeat('.', max(
$terminalWidth - mb_strlen($expression.$repeatExpression.$command.$nextDueDateLabel.$nextDueDate.$hasMutex) - 8, 0
));
<?php $hasMutex,
$nextDueDateLabel,
$nextDueDate
), $this->output->isVerbose() && mb_strlen($description) > 1 ? sprintf(
' <fg=#6C7280>%s%s %s</>',
str_repeat(' ', mb_strlen($expression) + 2),
'⇁',
<?php $nextDueDate
), $this->output->isVerbose() && mb_strlen($description) > 1 ? sprintf(
' <fg=#6C7280>%s%s %s</>',
str_repeat(' ', mb_strlen($expression) + 2),
'⇁',
$description
) : ''];
<?php Mutators\EnsureRelativePaths::class,
]);
$descriptionWidth = mb_strlen(preg_replace("/\<[\w=#\/\;,:.&,%?]+\>|\\e\[\d+m/", '$1', $description) ?? '');
$this->output->write(" $description ", false, $verbosity);
<?php ? (' '.$this->runTimeForHumans($startTime))
: '';
$runTimeWidth = mb_strlen($runTime);
$width = min(terminal()->width(), 150);
$dots = max($width - $descriptionWidth - $runTimeWidth - 10, 0);
<?php return false;
}
return mb_strlen($key, '8bit') === self::$supportedCiphers[strtolower($cipher)]['size'];
}
<?php protected function forCli($channels)
{
$maxChannelName = $channels->keys()->max(function ($channelName) {
return mb_strlen($channelName);
});
$terminalWidth = $this->getTerminalWidth();
<?php return $channels->map(function ($channel, $channelName) use ($maxChannelName, $terminalWidth) {
$resolver = $channel instanceof Closure ? 'Closure' : $channel;
$spaces = str_repeat(' ', max($maxChannelName + 6 - mb_strlen($channelName), 0));
$dots = str_repeat('.', max(
$terminalWidth - mb_strlen($channelName.$spaces.$resolver) - 6, 0
<?php $spaces = str_repeat(' ', max($maxChannelName + 6 - mb_strlen($channelName), 0));
$dots = str_repeat('.', max(
$terminalWidth - mb_strlen($channelName.$spaces.$resolver) - 6, 0
));
$dots = empty($dots) ? $dots : " $dots";
<?php {
$channelCountText = 'Showing ['.$channels->count().'] private channels';
$offset = $terminalWidth - mb_strlen($channelCountText) - 2;
$spaces = str_repeat(' ', $offset);
<?php ]),
);
$maxMethod = mb_strlen($routes->max('method'));
$terminalWidth = $this->getTerminalWidth();
<?php )
)->implode("\n");
$spaces = str_repeat(' ', max($maxMethod + 6 - mb_strlen($method), 0));
$dots = str_repeat('.', max(
$terminalWidth - mb_strlen($method.$spaces.$uri.$action) - 6 - ($action ? 1 : 0), 0
<?php $spaces = str_repeat(' ', max($maxMethod + 6 - mb_strlen($method), 0));
$dots = str_repeat('.', max(
$terminalWidth - mb_strlen($method.$spaces.$uri.$action) - 6 - ($action ? 1 : 0), 0
));
$dots = empty($dots) ? $dots : " $dots";