fork(4) download
  1. import 'dart:io';
  2.  
  3. String camelToSentence(String text) {
  4. var result = text.replaceAll(RegExp(r'(?<!^)(?=[A-Z])'), r" ");
  5. var finalResult = result[0].toUpperCase() + result.substring(1);
  6. return finalResult;
  7. }
  8.  
  9. void main() {
  10. print(camelToSentence("camelToSentence"));
  11. }
Success #stdin #stdout 1.2s 126868KB
stdin
Standard input is empty
stdout
Camel To Sentence