Iaik.Utils.SimpleFormatter.GetFormatPacket C# (CSharp) Method

GetFormatPacket() private method

Gets the formatable packet. It assumes that offset is already located after the start marker "{"
private GetFormatPacket ( int &offset, string str ) : string
offset int
str string
return string
        private string GetFormatPacket(ref int? offset, string str)
        {
            if (offset == null)
                return "";
            int start = offset.Value;
            offset = FindNextNotEscaped (offset.Value, str, "}") + 1;

            if (offset == 0)
                throw new FormatException ("Cannot find end Marker '}'");

            return str.Substring (start, offset.Value - start - 1);
        }