mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 17:25:32 +00:00
18 lines
488 B
C#
18 lines
488 B
C#
namespace HaWeb.HTMLHelpers;
|
|
public static class StringHelpers {
|
|
public static string GetEnumerationString(IEnumerable<string> strlist)
|
|
{
|
|
var res = "";
|
|
foreach (var str in strlist)
|
|
{
|
|
if (str != strlist.First())
|
|
if (str == strlist.Last())
|
|
res += " und " + str;
|
|
else
|
|
res += ", " + str;
|
|
else
|
|
res += str;
|
|
}
|
|
return res;
|
|
}
|
|
} |