Page 1 of 1

upperInitial() doesn't handle contractions

Posted: 29 Jun 2012, 08:32
by Igor
upperInitial incorrectly capitalizes contractions in show or episode names. e.g. earth'S, don'T

Re: upperInitial() doesn't handle contractions

Posted: 29 Jun 2012, 09:01
by rednoah
Changed upperInitial() to

Code: Select all

replaceAll(/(?<=[&()+.,-;<=>?\[\]_{|}~ ]|^)[a-z]/, { it.toUpperCase() })

Re: upperInitial() doesn't handle contractions

Posted: 29 Jun 2012, 15:33
by Igor
Awesome thanks!