underScoreToCamel function

String underScoreToCamel(
  1. String s
)

Helper function to convert an underscore string s to camel case.

Example:

  • hello_world -> helloWorld

Implementation

String underScoreToCamel(String s) => s.replaceAllMapped(RegExp('/(\_[a-z])/g'),
    (Match $1) => $1.toString().toUpperCase().replaceAll('_', ''));