in csharp/EPAM.Deltix.HdTime/Formatter.cs [455:470]
private static Int32 CalculateDigitLength(String source, Int32 position, Int32 expectedLength)
{
Int32 index;
for (index = position; index < position + expectedLength && index < source.Length; index ++)
{
Char sourceChar = source[index];
if (Char.IsDigit(sourceChar))
{
continue;
}
break;
}
return index - position;
}