Skip to content

Commit 5416745

Browse files
committed
update some info
1 parent 7a6cf30 commit 5416745

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Cli.php

+9
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,13 @@ public static function parseArgv(array $noValues = [], $mergeOpts = false): arra
255255
return [$fullScript, $script, $args, $sOpts, $lOpts];
256256
}
257257

258+
/**
259+
* clear Ansi Code
260+
* @param string $string
261+
* @return string
262+
*/
263+
public static function stripAnsiCode(string $string): string
264+
{
265+
return (string)\preg_replace('/\033\[[\d;?]*\w/', '', $string);
266+
}
258267
}

0 commit comments

Comments
 (0)