Basic method, but i think you could make better if you search
string mee = "address1,,city,country";
string[] arr = mee.Split(',');
string final = string.Empty;
for (int i = 0; i < arr.Length; i++)
{
if (string.IsNullOrEmpty(arr[i]))
continue;
final += i == 0 ? arr[i] : $",{arr[i]}";
}
Or perhaps with System.Linq (but you must test all possibilities)
string final = String.Join(",", mee.Split(',').Where((x) => !string.IsNullOrEmpty(x)));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…