returns the number of characters that _would_ have been written if it hadn't been truncated.