Add alternative width calculation option with empty space

This commit is contained in:
Xwiz committed 2022-02-12 17:39:40 +01:00
1 parent ea22cac7e4
commit 0a56c40b71
3 files changed
+33 -2

No files matched your search

@@ -28,4 +28,21 @@ class AppendHelper {
fwrite($fp, $trailer);
return $fp;
}
/**
* This function overwrite data in pointer from specified position
*
* @param $fp Pointer to file only
* @param $pos Position to insert
* @param $content Content to insert
*/
public static function overwriteToFile($fp, $pos, $content)
{
$cur = ftell($fp);
fseek($fp, $pos);
fwrite($fp, $content);
fseek($fp, $cur);
return $fp;
}
}