PathRemoveBlanks

[DllImport("shlwapi.dll", CharSet = CharSet.Unicode)]
public static extern void PathRemoveBlanks(
   [MarshalAs(UnmanagedType.LPWStr)] string lpszPath
);

Microsoft documentation: Link

Last updated