System.Xml.Xsl.Runtime.DecimalFormatter.RemoveTrailingComma C# (CSharp) Method

RemoveTrailingComma() private static method

private static RemoveTrailingComma ( StringBuilder builder, int commaIndex, int decimalIndex ) : int
builder System.Text.StringBuilder
commaIndex int
decimalIndex int
return int
        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;
        }