stop silly recursion. Implement init vers of question answering
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
namespace Utils
|
||||
{
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static string ReplaceLast(this string str, string oldValue, string newValue)
|
||||
{
|
||||
int index = str.LastIndexOf(oldValue);
|
||||
|
||||
return index < 0
|
||||
? str
|
||||
: str.Remove(index, oldValue.Length)
|
||||
.Insert(index, newValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8ff2e81002c444fb28eeb35e2e33286
|
||||
timeCreated: 1787585278
|
||||
Reference in New Issue
Block a user