{"id":182,"date":"2009-04-07T11:48:00","date_gmt":"2009-04-07T11:48:00","guid":{"rendered":"http:\/\/madprogrammer76.wordpress.com\/2009\/04\/07\/javascript-equalsignorecase-function"},"modified":"2009-04-07T11:48:00","modified_gmt":"2009-04-07T11:48:00","slug":"javascript-equalsignorecase-function","status":"publish","type":"post","link":"http:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/","title":{"rendered":"Javascript equalsIgnoreCase Function"},"content":{"rendered":"<p>This week&#8217;s code sample is JAVASCRIPT based. I found this while researching user validation routines. This function is a javascript version of a common Java function. We have replicated the calling syntax as a java programmer would expect to use it by effectively appending it as a method of the javascript String Object.<\/p>\n<p>For more great scripts: <a href=\"http:\/\/www.apriori-it.co.uk\/\" target=\"new\">http:\/\/www.apriori-it.co.uk<\/a><\/p>\n<p><strong><span style=\"text-decoration:underline;\">Important Note:<\/span><\/strong> Works with IE and FireFox<\/p>\n<pre style=\"color:blue;\">\/\/The first line assigns the MatchIgnoreCase function as \n\/\/an equalsIgnoreCase method of the String object \n\nString.prototype.equalsIgnoreCase = MatchIgnoreCase; \n\nfunction MatchIgnoreCase(strTerm, strToSearch) \n{ \n\tstrToSearch = strToSearch.toLowerCase(); \n\tstrTerm = strTerm.toLowerCase(); \n\tif(strToSearch==strTerm) \n\t{ \n\t\treturn true; \n\t} else { \n\t\treturn false; \n\t} \n}<\/pre>\n<div class=\"blogger-post-footer\"><img loading=\"lazy\" decoding=\"async\" src=\"\" alt=\"\" width=\"1\" height=\"1\" \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This week&#8217;s code sample is JAVASCRIPT based. I found this while researching user validation routines. This function is a javascript version of a common Java function. We have replicated the calling syntax as a java programmer would expect to use it by effectively appending it as a method of the javascript String Object. For more &hellip; <a href=\"http:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Javascript equalsIgnoreCase Function<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,23,37,96],"tags":[107,113,122,249,252],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>Javascript equalsIgnoreCase Function - LDNDeveloper<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Javascript equalsIgnoreCase Function - LDNDeveloper\" \/>\r\n<meta property=\"og:description\" content=\"This week&#8217;s code sample is JAVASCRIPT based. I found this while researching user validation routines. This function is a javascript version of a common Java function. We have replicated the calling syntax as a java programmer would expect to use it by effectively appending it as a method of the javascript String Object. For more &hellip; Continue reading Javascript equalsIgnoreCase Function\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/\" \/>\r\n<meta property=\"og:site_name\" content=\"LDNDeveloper\" \/>\r\n<meta property=\"article:published_time\" content=\"2009-04-07T11:48:00+00:00\" \/>\r\n<meta name=\"author\" content=\"andrewpallant\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@ldnDeveloper\" \/>\r\n<meta name=\"twitter:site\" content=\"@LdnDeveloper\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"andrewpallant\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/\"},\"author\":{\"name\":\"andrewpallant\",\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97\"},\"headline\":\"Javascript equalsIgnoreCase Function\",\"datePublished\":\"2009-04-07T11:48:00+00:00\",\"dateModified\":\"2009-04-07T11:48:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/\"},\"wordCount\":73,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84\"},\"keywords\":[\"Code\",\"equalsIgnoreCase\",\"Javascript\",\"Tips\",\"Web\"],\"articleSection\":[\"Better Coding\",\"Deployment\",\"Ideas\",\"Web\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/\",\"url\":\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/\",\"name\":\"Javascript equalsIgnoreCase Function - LDNDeveloper\",\"isPartOf\":{\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#website\"},\"datePublished\":\"2009-04-07T11:48:00+00:00\",\"dateModified\":\"2009-04-07T11:48:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/andrewpallant.ca\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Javascript equalsIgnoreCase Function\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#website\",\"url\":\"http:\/\/andrewpallant.ca\/wordpress\/\",\"name\":\"LDNDeveloper\",\"description\":\"Learning, Growing and Sharing.\",\"publisher\":{\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/andrewpallant.ca\/wordpress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84\",\"name\":\"ldnDeveloper\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg\",\"contentUrl\":\"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg\",\"width\":512,\"height\":512,\"caption\":\"ldnDeveloper\"},\"logo\":{\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/\"},\"description\":\"Andrew Pallant (@LdnDeveloper) has been a web, database and desktop developer for over 16 years. Andrew has worked on projects that ranged from factory automation to writing business applications. Most recently he has been heavily involved in various forms for ecommerce projects. Over the years Andrew has worn many hats: Project Manager, IT Manager, Lead Developer, Supervisor of Developers and many more - See more at: http:\/\/www.unlatched.com\/#sthash.8DiTkpKy.dpuf\",\"sameAs\":[\"http:\/\/www.andrewpallant.ca\",\"https:\/\/x.com\/LdnDeveloper\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97\",\"name\":\"andrewpallant\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/0.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/0.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"andrewpallant\"},\"url\":\"http:\/\/andrewpallant.ca\/wordpress\/author\/andrewpallant\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Javascript equalsIgnoreCase Function - LDNDeveloper","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/","og_locale":"en_US","og_type":"article","og_title":"Javascript equalsIgnoreCase Function - LDNDeveloper","og_description":"This week&#8217;s code sample is JAVASCRIPT based. I found this while researching user validation routines. This function is a javascript version of a common Java function. We have replicated the calling syntax as a java programmer would expect to use it by effectively appending it as a method of the javascript String Object. For more &hellip; Continue reading Javascript equalsIgnoreCase Function","og_url":"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/","og_site_name":"LDNDeveloper","article_published_time":"2009-04-07T11:48:00+00:00","author":"andrewpallant","twitter_card":"summary_large_image","twitter_creator":"@ldnDeveloper","twitter_site":"@LdnDeveloper","twitter_misc":{"Written by":"andrewpallant","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/#article","isPartOf":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/"},"author":{"name":"andrewpallant","@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97"},"headline":"Javascript equalsIgnoreCase Function","datePublished":"2009-04-07T11:48:00+00:00","dateModified":"2009-04-07T11:48:00+00:00","mainEntityOfPage":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/"},"wordCount":73,"commentCount":0,"publisher":{"@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84"},"keywords":["Code","equalsIgnoreCase","Javascript","Tips","Web"],"articleSection":["Better Coding","Deployment","Ideas","Web"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/","url":"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/","name":"Javascript equalsIgnoreCase Function - LDNDeveloper","isPartOf":{"@id":"http:\/\/andrewpallant.ca\/wordpress\/#website"},"datePublished":"2009-04-07T11:48:00+00:00","dateModified":"2009-04-07T11:48:00+00:00","breadcrumb":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/andrewpallant.ca\/wordpress\/javascript-equalsignorecase-function\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/andrewpallant.ca\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Javascript equalsIgnoreCase Function"}]},{"@type":"WebSite","@id":"http:\/\/andrewpallant.ca\/wordpress\/#website","url":"http:\/\/andrewpallant.ca\/wordpress\/","name":"LDNDeveloper","description":"Learning, Growing and Sharing.","publisher":{"@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/andrewpallant.ca\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84","name":"ldnDeveloper","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg","contentUrl":"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg","width":512,"height":512,"caption":"ldnDeveloper"},"logo":{"@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/"},"description":"Andrew Pallant (@LdnDeveloper) has been a web, database and desktop developer for over 16 years. Andrew has worked on projects that ranged from factory automation to writing business applications. Most recently he has been heavily involved in various forms for ecommerce projects. Over the years Andrew has worn many hats: Project Manager, IT Manager, Lead Developer, Supervisor of Developers and many more - See more at: http:\/\/www.unlatched.com\/#sthash.8DiTkpKy.dpuf","sameAs":["http:\/\/www.andrewpallant.ca","https:\/\/x.com\/LdnDeveloper"]},{"@type":"Person","@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97","name":"andrewpallant","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/","url":"http:\/\/0.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"http:\/\/0.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"andrewpallant"},"url":"http:\/\/andrewpallant.ca\/wordpress\/author\/andrewpallant\/"}]}},"_links":{"self":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/posts\/182"}],"collection":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/comments?post=182"}],"version-history":[{"count":0,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/posts\/182\/revisions"}],"wp:attachment":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/media?parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/categories?post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/tags?post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}