private float?ParseNonNegativeNumber(StringPtr ptr) { var begin = ptr.Index; ptr.AdvanceNonNegativeNumber(); if (begin == ptr.Index) { return(null); } var numberText = ptr.Target.Substring(begin, ptr.Index - begin); return(float.Parse(numberText, System.Globalization.CultureInfo.InvariantCulture)); }