toCamelCase method

String toCamelCase()

to camel case of string example: "this is a boy".toCamelCase() => "tHiS Is a bOy".

Implementation

String toCamelCase() {
  var _str = '';
  for (int i = 0; i < this.length; i++) {
    if (i.isOdd) {
      _str += this[i].toUpperCase();
    } else {
      _str += this[i].toLowerCase();
    }
  }
  return _str;
}