snakeCase method

String snakeCase([
  1. Pattern? pattern
])

Snake-cases this String with separations determined using the given pattern.

Implementation

String snakeCase([Pattern? pattern]) => split(pattern ?? _delimiters).join('_');