public void TrimEnd() { const string MY_STRING = "Hello World, Hello World!"; char[] myChar = { 'r', 'o', 'W', 'l', 'd', '!', ' ' }; Check.That(MY_STRING.TrimEnd(myChar)).IsEqualTo("Hello World, He"); }
public void TrimStart() { //attention les majuscules sont importantes const string MY_STRING = "Hello World, hello World!"; char[] myChar = { 'H', 'e', 'o', 'W', 'L', 'd', ' ' }; Check.That(MY_STRING.TrimStart(myChar)).IsEqualTo("llo World, hello World!"); }