Maybe! Using an exact replacement is always best as most gas spring applications have been designed and engineered
for the expected actions and reactions you've seen in your application. Deviating just a little in the length or stroke
could mean the lid not closing completely or opening fully.