I have a WideString variable containing some data but when the string was assigned some extra nulls where added at more or less random places in the data. I now need to stri
Those are not extra nulls. They're part of the string.
You should do some reading on multi-byte characters, which includes WideStrings. Characters are more than one byte in size, and some of those extra bytes are NULLs.
You might start here with Nick Hodges' articles on Unicode, written when Delphi 2009 was first released to help people transition from single-byte characters to multi-byte ones. There are three articles in the series, IIRC.