Fixed #27. Added support for rightTrim function

This commit is contained in:
Shekhar Gulati
2016-05-21 22:50:59 +05:30
parent 665cc8f32e
commit 18b0f0ae19
2 changed files with 18 additions and 0 deletions
+7
View File
@@ -612,4 +612,11 @@ public class StrmanTest {
assertThat(rightPad("10000", "0", 5), equalTo("10000"));
assertThat(rightPad("10000000", "0", 5), equalTo("10000000"));
}
@Test
public void rightTrim_shouldRemoveSpacesFromTheRight() throws Exception {
assertThat(rightTrim("strman "), equalTo("strman"));
assertThat(rightTrim(" strman"), equalTo(" strman"));
assertThat(rightTrim("strman"), equalTo("strman"));
}
}