12 lines
300 B
C#
12 lines
300 B
C#
namespace ModuleManager.Modules;
|
|
|
|
public class StringConversions
|
|
{
|
|
public string ReplaceFirst(string input, char from, char to)
|
|
{
|
|
int index = input.IndexOf(from);
|
|
if (index < 0) return input;
|
|
return input.Substring(0, index) + to + input.Substring(index + 1);
|
|
}
|
|
|
|
} |