Completed implementation of Truncate system function.