Ready to test v2.43.0
This commit is contained in:
@ -348,8 +348,8 @@ public class ProcessDataStandardFormat
|
||||
int startsAt = 0;
|
||||
string[] segments;
|
||||
int? currentGroup = null;
|
||||
char inputSeperator = '\t';
|
||||
char outputSeperator = '\t';
|
||||
char inputSeparator = '\t';
|
||||
char outputSeparator = '\t';
|
||||
List<int> vs = new();
|
||||
List<int[]> groups = new();
|
||||
string[] lines = File.ReadAllLines(reportFullPath);
|
||||
@ -358,7 +358,7 @@ public class ProcessDataStandardFormat
|
||||
{
|
||||
if (string.IsNullOrEmpty(lines[i]))
|
||||
continue;
|
||||
segments = lines[i].Split(inputSeperator);
|
||||
segments = lines[i].Split(inputSeparator);
|
||||
if (currentGroup is null)
|
||||
currentGroup = segments.Length;
|
||||
if (segments.Length != currentGroup)
|
||||
@ -368,20 +368,20 @@ public class ProcessDataStandardFormat
|
||||
startsAt = i;
|
||||
}
|
||||
}
|
||||
if (startsAt == lines.Length - 1 && lines[0].Split(inputSeperator).Length != currentGroup)
|
||||
if (startsAt == lines.Length - 1 && lines[0].Split(inputSeparator).Length != currentGroup)
|
||||
groups.Add(new int[] { lines.Length - 1, lines.Length - 1 });
|
||||
for (int g = 0; g < groups.Count; g++)
|
||||
{
|
||||
vs.Clear();
|
||||
group = groups[g];
|
||||
line = lines[group[0]];
|
||||
segments = line.Split(inputSeperator);
|
||||
segments = line.Split(inputSeparator);
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
vs.Add(segments[s].Length);
|
||||
for (int i = group[0]; i <= group[1]; i++)
|
||||
{
|
||||
line = lines[i];
|
||||
segments = line.Split(inputSeperator);
|
||||
segments = line.Split(inputSeparator);
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
{
|
||||
if (vs[s] < segments[s].Length)
|
||||
@ -390,16 +390,16 @@ public class ProcessDataStandardFormat
|
||||
}
|
||||
_ = stringBuilder.Clear();
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
_ = stringBuilder.Append((s + 1).ToString().PadLeft(vs[s], ' ')).Append(outputSeperator);
|
||||
_ = stringBuilder.Append((s + 1).ToString().PadLeft(vs[s], ' ')).Append(outputSeparator);
|
||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
results.Add(stringBuilder.ToString());
|
||||
for (int i = group[0]; i <= group[1]; i++)
|
||||
{
|
||||
line = lines[i];
|
||||
_ = stringBuilder.Clear();
|
||||
segments = line.Split(inputSeperator);
|
||||
segments = line.Split(inputSeparator);
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
_ = stringBuilder.Append(segments[s].PadLeft(vs[s], ' ')).Append(outputSeperator);
|
||||
_ = stringBuilder.Append(segments[s].PadLeft(vs[s], ' ')).Append(outputSeparator);
|
||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
results.Add(stringBuilder.ToString());
|
||||
}
|
||||
|
Reference in New Issue
Block a user