private static int RemoveTrailingComma(StringBuilder builder, int commaIndex, int decimalIndex) {
if (commaIndex > 0 && commaIndex == (decimalIndex - 1)) {
builder.Remove(decimalIndex - 1, 1);
} else if (decimalIndex > commaIndex) {
return decimalIndex - commaIndex - 1;
}
return 0;
}