in csharp/EPAM.Deltix.HdTime/Formatter.cs [95:111]
internal static unsafe void RollbackPreciseTimeSourceReplacement(String source, Int32 position, Int32 count, Byte nanoseconds)
{
fixed (Char* pStr = source)
{
Char* ch = pStr + position;
Int32 digitPosition = 1;
while (count > 0)
{
Int32 digit = SubstractDigit(nanoseconds, digitPosition);
*ch = ConvertInt32ToChar(digit);
ch++;
count --;
digitPosition++;
}
}
}