This repository has been archived on 2022-08-05. You can view files and clone it, but cannot push or open issues or pull requests.
CC-Functions/Misc/ArrayFormatter.cs

15 lines
439 B
C#
Raw Normal View History

2019-11-29 21:27:24 +01:00
namespace CC_Functions.Misc
2019-09-07 10:12:24 +02:00
{
public static class ArrayFormatter
{
2019-12-22 16:58:16 +01:00
public static string ElementsToString(this object[] input, string separator = "\r\n")
2019-09-07 10:12:24 +02:00
{
2019-12-22 16:58:16 +01:00
string a = "";
for (int i = 0; i < input.Length; i++)
a += input[i] + separator;
if (separator.Length > 0)
a = a.Remove(a.Length - separator.Length);
return a;
2019-09-07 10:12:24 +02:00
}
}
2019-11-29 21:27:24 +01:00
}