(doc) Use the full alphabet for the well-known example text.
This change adds the missing `s` character. Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
This commit is contained in:
parent
1661e5519c
commit
954ade4c1a
|
@ -52,13 +52,13 @@ import org.apache.commons.lang3.StringUtils;
|
|||
* Map valuesMap = HashMap();
|
||||
* valuesMap.put("animal", "quick brown fox");
|
||||
* valuesMap.put("target", "lazy dog");
|
||||
* String templateString = "The ${animal} jumped over the ${target}.";
|
||||
* String templateString = "The ${animal} jumps over the ${target}.";
|
||||
* StrSubstitutor sub = new StrSubstitutor(valuesMap);
|
||||
* String resolvedString = sub.replace(templateString);
|
||||
* </pre>
|
||||
* yielding:
|
||||
* <pre>
|
||||
* The quick brown fox jumped over the lazy dog.
|
||||
* The quick brown fox jumps over the lazy dog.
|
||||
* </pre>
|
||||
* <p>
|
||||
* Also, this class allows to set a default value for unresolved variables.
|
||||
|
@ -72,13 +72,13 @@ import org.apache.commons.lang3.StringUtils;
|
|||
* Map valuesMap = HashMap();
|
||||
* valuesMap.put("animal", "quick brown fox");
|
||||
* valuesMap.put("target", "lazy dog");
|
||||
* String templateString = "The ${animal} jumped over the ${target}. ${undefined.number:-1234567890}.";
|
||||
* String templateString = "The ${animal} jumps over the ${target}. ${undefined.number:-1234567890}.";
|
||||
* StrSubstitutor sub = new StrSubstitutor(valuesMap);
|
||||
* String resolvedString = sub.replace(templateString);
|
||||
* </pre>
|
||||
* yielding:
|
||||
* <pre>
|
||||
* The quick brown fox jumped over the lazy dog. 1234567890.
|
||||
* The quick brown fox jumps over the lazy dog. 1234567890.
|
||||
* </pre>
|
||||
* <p>
|
||||
* In addition to this usage pattern there are some static convenience methods that
|
||||
|
|
|
@ -2940,7 +2940,7 @@ public class StringUtilsTest {
|
|||
*/
|
||||
@Test
|
||||
public void testToString() throws UnsupportedEncodingException {
|
||||
final String expectedString = "The quick brown fox jumped over the lazy dog.";
|
||||
final String expectedString = "The quick brown fox jumps over the lazy dog.";
|
||||
byte[] expectedBytes = expectedString.getBytes(Charset.defaultCharset());
|
||||
// sanity check start
|
||||
assertArrayEquals(expectedBytes, expectedString.getBytes());
|
||||
|
@ -3087,7 +3087,7 @@ public class StringUtilsTest {
|
|||
*/
|
||||
@Test
|
||||
public void testToEncodedString() {
|
||||
final String expectedString = "The quick brown fox jumped over the lazy dog.";
|
||||
final String expectedString = "The quick brown fox jumps over the lazy dog.";
|
||||
String encoding = SystemUtils.FILE_ENCODING;
|
||||
byte[] expectedBytes = expectedString.getBytes(Charset.defaultCharset());
|
||||
// sanity check start
|
||||
|
|
Loading…
Reference in New Issue