diff options
-rwxr-xr-x | textbook_companion.module | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/textbook_companion.module b/textbook_companion.module index ae950e0..97ff309 100755 --- a/textbook_companion.module +++ b/textbook_companion.module @@ -1,5 +1,6 @@ <?php // $Id$ +require_once('email.inc'); /* * Implementation of hook_menu(). */ @@ -837,6 +838,16 @@ function _tbc_list_of_category($category_id = NULL) } //$category_list_data = $category_list->fetchObject() return $category; } +function _tbc_sentence_case($string) +{ + $string =ucwords(strtolower($string)); + foreach (array('-', '\'') as $delimiter) { + if (strpos($string, $delimiter)!==false) { + $string =implode($delimiter, array_map('ucfirst', explode($delimiter, $string))); + } + } + return $string; +} function textbook_companion_init() { $path = drupal_get_path('module', 'textbook_companion'); |