Beispiel #1
0
        protected void WriteRecord(TextRecord record, string builderKey, int distance = -1)
        {
            if (distance != -1 && record.Value.Length > distance)
            {
                record.Value = record.Value.Substring(0, distance);
            }

            buildersDictionary[builderKey].Append(record.Value);
            if (distance != -1)
            {
                buildersDictionary[builderKey].Append(' ', distance - record.Value.Length);
            }
        }
Beispiel #2
0
        protected string WriteRecordInLine(string line, TextRecord record, int distance = -1)
        {
            if (distance != -1 && record.Value.Length > distance)
            {
                record.Value = record.Value.Substring(0, distance);
            }

            line += record.Value;
            if (distance != -1)
            {
                line += new String(' ', distance - record.Value.Length);
            }

            return(line);
        }