The driveshaft in a 1998 S-10 extended cab and a regular cab, both with a 4-cylinder and 5-speed manual transmission, will likely be different lengths. The extended cab's longer wheelbase requires a longer driveshaft to connect the transmission to the rear axle.
While the diameter and general design might be similar, the overall length will be the crucial difference. You cannot interchange them. Using the wrong length driveshaft can cause vibrations, binding, and potential damage to the drivetrain.