(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();
|
* Map valuesMap = HashMap();
|
||||||
* valuesMap.put("animal", "quick brown fox");
|
* valuesMap.put("animal", "quick brown fox");
|
||||||
* valuesMap.put("target", "lazy dog");
|
* 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);
|
* StrSubstitutor sub = new StrSubstitutor(valuesMap);
|
||||||
* String resolvedString = sub.replace(templateString);
|
* String resolvedString = sub.replace(templateString);
|
||||||
* </pre>
|
* </pre>
|
||||||
* yielding:
|
* yielding:
|
||||||
* <pre>
|
* <pre>
|
||||||
* The quick brown fox jumped over the lazy dog.
|
* The quick brown fox jumps over the lazy dog.
|
||||||
* </pre>
|
* </pre>
|
||||||
* <p>
|
* <p>
|
||||||
* Also, this class allows to set a default value for unresolved variables.
|
* 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();
|
* Map valuesMap = HashMap();
|
||||||
* valuesMap.put("animal", "quick brown fox");
|
* valuesMap.put("animal", "quick brown fox");
|
||||||
* valuesMap.put("target", "lazy dog");
|
* 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);
|
* StrSubstitutor sub = new StrSubstitutor(valuesMap);
|
||||||
* String resolvedString = sub.replace(templateString);
|
* String resolvedString = sub.replace(templateString);
|
||||||
* </pre>
|
* </pre>
|
||||||
* yielding:
|
* yielding:
|
||||||
* <pre>
|
* <pre>
|
||||||
* The quick brown fox jumped over the lazy dog. 1234567890.
|
* The quick brown fox jumps over the lazy dog. 1234567890.
|
||||||
* </pre>
|
* </pre>
|
||||||
* <p>
|
* <p>
|
||||||
* In addition to this usage pattern there are some static convenience methods that
|
* In addition to this usage pattern there are some static convenience methods that
|
||||||
|
|
|
@ -2940,7 +2940,7 @@ public class StringUtilsTest {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testToString() throws UnsupportedEncodingException {
|
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());
|
byte[] expectedBytes = expectedString.getBytes(Charset.defaultCharset());
|
||||||
// sanity check start
|
// sanity check start
|
||||||
assertArrayEquals(expectedBytes, expectedString.getBytes());
|
assertArrayEquals(expectedBytes, expectedString.getBytes());
|
||||||
|
@ -3087,7 +3087,7 @@ public class StringUtilsTest {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testToEncodedString() {
|
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;
|
String encoding = SystemUtils.FILE_ENCODING;
|
||||||
byte[] expectedBytes = expectedString.getBytes(Charset.defaultCharset());
|
byte[] expectedBytes = expectedString.getBytes(Charset.defaultCharset());
|
||||||
// sanity check start
|
// sanity check start
|
||||||
|
|
Loading…
Reference in New Issue