0
0
mirror of https://github.com/sp-tarkov/installer.git synced 2025-02-13 03:30:45 -05:00
installer/Aki.Helper/StringHelper.cs

19 lines
622 B
C#

namespace SPT_AKI_Installer.Aki.Helper
{
public class StringHelper
{
/// <summary>
/// string to split, changes oldChar to newChar
/// </summary>
/// <param name="toSplit"></param>
/// <param name="oldChar"></param>
/// <param name="newChar"></param>
/// <param name="amount"></param>
/// <returns>returns the string at a position using amount</returns>
public string Splitter(string toSplit, char oldChar, char newChar, int amount)
{
return toSplit.Replace(oldChar, newChar).Split(newChar)[^amount];
}
}
}