1
0
mirror of synced 2024-12-20 10:25:55 +01:00
TaikoLocalServer/TaikoWebUI/Services/StringUtil.cs
shiibe 51730ce60f Make song titles and artists use the active language
* The song titles and artists for the High Score and Dani Dojo screens will show based on the current language selected in the Switcher
2024-03-08 15:11:54 -05:00

17 lines
446 B
C#

public interface IStringUtil
{
List<string> SplitIntoGroups(string str, int groupSize);
}
public class StringUtil : IStringUtil
{
public List<string> SplitIntoGroups(string str, int groupSize)
{
List<string> groups = new List<string>();
for (int i = 0; i < str.Length; i += groupSize)
{
groups.Add(str.Substring(i, Math.Min(groupSize, str.Length - i)));
}
return groups;
}
}