{"id":668,"date":"2008-04-13T22:48:37","date_gmt":"2008-04-14T02:48:37","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/2008\/04\/13\/ucwords\/"},"modified":"2008-04-13T22:48:37","modified_gmt":"2008-04-14T02:48:37","slug":"ucwords","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2008\/04\/13\/ucwords\/","title":{"rendered":"UCWords"},"content":{"rendered":"<p>Every now and then I find that I need to do something that seems remarkably obscure, and am surprised to learn that PHP has a function to do it. I found myself cleaning up a really sub-par Wikipedia article, where someone had entered a massive list of things in ALL CAPS.<\/p>\n<p>It&#8217;s easy enough to upper-case everything, or to lower-case everything. But what I really wanted to was to capitalize the first letter of each word, because they&#8217;re all proper nouns. It turns out that PHP has a <a href=\"http:\/\/us2.php.net\/manual\/en\/function.ucwords.php\">ucwords<\/a> function to do precisely this.<\/p>\n<p>And thus <a href=\"http:\/\/ttwagner.com\/code\/lcase.php\" rel=\"nofollow\">this page<\/a>, which I suspect will never be useful to anyone, was born. Enter text, and it&#8217;ll covert it to lowercase, but upper-case the first letter of each word. And in this case, the time required to write the script was less than the time it&#8217;d have taken me to change it all by hand.<\/p>","protected":false},"excerpt":{"rendered":"<p>Every now and then I find that I need to do something that seems remarkably obscure, and am surprised to learn that PHP has a function to do it. I found myself cleaning up a really sub-par Wikipedia article, where &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2008\/04\/13\/ucwords\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,10,11,18,22],"tags":[],"class_list":["post-668","post","type-post","status-publish","format-standard","hentry","category-computers","category-cool-links","category-ideas","category-insanity","category-ocd","category-programming"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=668"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/668\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}