That's
StringReplace -- the function
oldString -- what you want to replace
'''' -- four single quotes in a row, outer ones to denote a string, middle two = 1 single single-quote
'"' -- two outer singles, one inner double
[rfReplaceAll] -- argument to StringReplace to change all instances of single quotes found
StringReplace does not change the source string, unless you assign the result back to the old string.
example usage:
var oldString, newString: string;
begin
oldString := '5''8';
newString := StringReplace(oldString, '''', '"', [rfReplaceAll]);