trim
thermage/thermage
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Strip whitespace (or other characters) from the beginning and end of a string
trim
(
string $string
,
string $characters
=
" \n\r\t\v\x00"
):
string
@
fwrite
(
$input
,
terminal
()->
getCsi
() .
'6n'
);
$code
=
trim
(
fread
(
$input
,
1024
));
shell_exec
(
sprintf
(
'stty %s'
,
$sttyMode
));
src/Base/Cursor.php
{
$width
=
getenv
(
'COLUMNS'
);
if (
$width
!==
false
) {
return (int)
trim
(
$width
);
}
if (
self
::
$width
===
null
) {
src/Base/Terminal.php
{
$height
=
getenv
(
'LINES'
);
if (
$height
!==
false
) {
return (int)
trim
(
$height
);
}
if (
self
::
$height
===
null
) {
src/Base/Terminal.php
private function
initDimensions
():
void
{
if (
DIRECTORY_SEPARATOR
===
'\\'
) {
if (
preg_match
(
'/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/'
,
trim
(
getenv
(
'ANSICON'
)),
$matches
)) {
self
::
$width
= (int)
$matches
[
1
];
src/Base/Terminal.php