[Test]
public void ShouldReplaceWithEmpty()
{
const string arg = "This is a string";
Assert.AreEqual("This is a", arg.ReplaceWithEmpty(" string"));
}
public static string ReplaceWithEmpty(this string arg, string toReplace)
{
return arg.Replace(toReplace, string.Empty);
}
2009-07-21
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment