This commit is contained in:
Looly
2020-10-27 10:50:03 +08:00
parent 0c6bd4e7dc
commit c138eb5028
2 changed files with 6 additions and 1 deletions

View File

@@ -465,4 +465,10 @@ public class StrUtilTest {
Assert.assertTrue(StrUtil.startWith(a, b));
Assert.assertFalse(StrUtil.startWithIgnoreEquals(a, b));
}
@Test
public void indexedFormatTest() {
final String ret = StrUtil.indexedFormat("this is {0} for {1}", "a", 1000);
Assert.assertEquals("this is a for 1,000", ret);
}
}