Java String equalsIgnoreCase() 1. Overview In this quick tutorial, we’ll look at determining if two String values are the same when we ignore case. 2. Using the equalsIgnoreCase() equalsIgnoreCase() accepts another String and returns a boolean value: String lower = “equals ignore case”; String UPPER = “EQUALS IGNORE CASE”; assertThat(lower.equalsIgnoreCase(UPPER)).isTrue(); 3.… Continue Reading java-string-equalsignorecase

Check If a String Contains All The Letters of The Alphabet 1. Overview In this tutorial,  we’ll see how to check if a String contains all the letters of the alphabet or not. Here’s a quick example: “Farmer jack realized that big yellow quilts were expensive.” – which does actually contain all… Continue Reading java-string-contains-all-letters

Java String.codePointCount() Java Java String The method codePointCount() returns the number of Unicode code points in the specified range. The text range begins at the first index and ends at the second index – 1. Available Signatures public int codePointCount(int beginIndex, int endIndex) Example @Test public void whenCallCodePointCount_thenCorrect() { assertEquals(2,… Continue Reading string-code-point-count

Java String.concat() Java Java String The method concat() concatenates two Strings. Simply put, it connects them into a single String. If the length of the argument is 0, then the method simply returns the String object. Available Signatures public String concat(String str) Example @Test public void whenCallConcat_thenCorrect() { assertEquals(“elephant”, “elep”.concat(“hant”));… Continue Reading string-concat