public static function EasyRdf_Utils::camelise

Convert a string into CamelCase

A capital letter is inserted for any non-letter (including userscore). For example: 'hello world' becomes HelloWorld 'rss-tag-soup' becomes RssTagSoup 'FOO//BAR' becomes FooBar

Parameters

string The input string:

Return value

string The input string converted to CamelCase

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Utils.php, line 62

Class

EasyRdf_Utils
Class containing static utility functions

Code

public static function camelise($str) {
  $cc = '';
  foreach (preg_split("/[\\W_]+/", $str) as $part) {
    $cc .= ucfirst(strtolower($part));
  }
  return $cc;
}