mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 17:55:32 +00:00
Ported libs fo net V6
This commit is contained in:
18
HaWeb/HTMLHelpers/StringHelpers.cs
Normal file
18
HaWeb/HTMLHelpers/StringHelpers.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace HaWeb.HTMLHelpers;
|
||||
public static class StringHelpers {
|
||||
public static string GetEnumerationString(List<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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user