Underscore to camel case

An example showing how to underscore to camel case using Tizen 2.3.
function camelize(str) {
  str = str.replace(/[\-_\s]+(.)?/g, function(undefined, c) {
    return c ? c.toUpperCase() : '';
  });
  return str.substr(0, 1).toLowerCase() + str.substr(1);
};

Responses

0 Replies