Initial work on Frame Edit

This commit is contained in:
Deon George
2019-07-31 20:19:41 +08:00
parent aa6b2f3244
commit bb031b1b82
7 changed files with 269 additions and 11 deletions

View File

@@ -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);
}
}