Files
sdk/pkg/analyzer_utilities/test/extensions
Paul Berry 790d844b51 [analyzer_utilities] Add String.toSnakeCase extension method.
This extension method complements the existing `toCamelCase` and
`toPascalCase` extension methods, allowing a string to be converted
from `camelCase` or `PascalCase` to `snake_case`.

This extension method will be useful in the analyzer diagnostic
message generation logic, which still uses a mix of case styles.

Note that there's no need for a separate method to convert to
`UPPER_SNAKE_CASE`; that can be easily done by calling `toUpperCase`
after `toSnakeCase`.

Change-Id: I6a6a69647f4ee176ecdbaefc3de0906a88c69079
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460206
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-11-07 05:26:20 -08:00
..