{"id":97,"date":"2010-11-12T12:57:58","date_gmt":"2010-11-12T19:57:58","guid":{"rendered":"http:\/\/shivdev.com\/blog\/2010\/11\/12\/implement-a-case-insensitive-contains-method-for-java-string-class\/"},"modified":"2011-05-06T07:29:39","modified_gmt":"2011-05-06T07:29:39","slug":"implement-a-case-insensitive-contains-method-for-java-string-class","status":"publish","type":"post","link":"http:\/\/shivdev.com\/blog\/2010\/11\/12\/implement-a-case-insensitive-contains-method-for-java-string-class\/","title":{"rendered":"Implement a case insensitive contains() method for Java String class"},"content":{"rendered":"<p>One simple solution is to convert both strings to lower case and then use the contains() method.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npublic boolean containsIgnoreCase(String longString, String shortString) {\r\n    return (longString.toLowerCase().contains(shortString.toLowerCase()));\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>One simple solution is to convert both strings to lower case and then use the contains() method.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/97"}],"collection":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":1,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"predecessor-version":[{"id":190,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/97\/revisions\/190"}],"wp:attachment":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}