BAEL-1171 java.lang.String API
This commit is contained in:
parent
e2085cb4a6
commit
82fde89335
|
@ -38,7 +38,7 @@ public class StringTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void whenGetBytesUsingUTF16_thenCorrect() {
|
||||
public void whenGetBytesUsingASCII_thenCorrect() {
|
||||
byte[] byteArray = "efgh".getBytes(StandardCharsets.US_ASCII);
|
||||
byte[] expected = new byte[] { 101, 102, 103, 104 };
|
||||
|
||||
|
@ -155,6 +155,13 @@ public class StringTest {
|
|||
|
||||
String[] result = s.split("*");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenCallSubSequence_thenCorrect() {
|
||||
String s = "Welcome to Baeldung";
|
||||
|
||||
assertEquals("Welcome", s.subSequence(0, 7));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenCallSubstring_thenCorrect() {
|
||||
|
|
Loading…
Reference in New Issue