Introduce libphutil UTF8 case changing functions
Summary:
Ref T2632. To fix one of the issues there, we need to be able to call ucwords() on utf8 strings. Currently, ucwords() mangles utf8 strings destructively. For example:
$ php -r 'echo ucwords("\xE9\xBA\x9F");' | icat \xc9\xba\x9f ^^^^ WTF?
Write a wrapper function instead. These wrappers should work okay if mbstring is available; probably not as well without it.
I've been very conservative in my implementation of ucwords() to avoid doing anything crazy with languages I don't speak. We can refine these later.
Test Plan: Added unit tests.
Reviewers: AnhNhan, chad, vrana
Reviewed By: AnhNhan
CC: aran
Maniphest Tasks: T2632
Differential Revision: https://secure.phabricator.com/D5191