Add alternative width calculation option with empty space
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user