2022-05-14 02:58:38 +01:00
|
|
|
|
namespace SPT_AKI_Installer.Aki.Helper
|
2022-05-13 22:41:15 +01:00
|
|
|
|
{
|
2022-05-14 12:19:40 +01:00
|
|
|
|
public class StringHelper
|
2022-05-13 22:41:15 +01:00
|
|
|
|
{
|
|
|
|
|
/// <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>
|
2022-05-14 12:19:40 +01:00
|
|
|
|
public string Splitter(string toSplit, char oldChar, char newChar, int amount)
|
2022-05-13 22:41:15 +01:00
|
|
|
|
{
|
|
|
|
|
return toSplit.Replace(oldChar, newChar).Split(newChar)[^amount];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|