Initial work on Frame Edit
This commit is contained in:
@@ -38,4 +38,16 @@ class Ansi extends Frame
|
||||
public static function strlenv($text):int {
|
||||
return strlen($text ? preg_replace('/'.ESC.'\[[0-9;?]+[a-zA-Z]/','',$text) : $text);
|
||||
}
|
||||
|
||||
// @todo make abstract
|
||||
/**
|
||||
* This function returns the frame content, raw
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function raw(): string
|
||||
{
|
||||
// We need to convert any ESC's, not next to [ into a character, otherwise we are off by one
|
||||
return preg_replace('/'.ESC.'([^\[])/',"|$1",$this->fo->content);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user