Replaces the postfix of a string.
A string with the postfix replaced.
If the string does not end with the postfix, the string itself is returned.
string s0 = MainUtil.ReplacePostfix("Hello world", "world", "you"); // "Hello you"
string s1 = MainUtil.ReplacePostfix("Hello world", "you", "me"); // "Hello world"
MainUtil Class | Sitecore Namespace | ReplacePrefix