wordSeparators property
The default separators recognized by toCamelCase and other related functions.
The recognized separators are:
- Consecutive uppercase characters
-
- hyphen_
- underscore
All separators are removed except for consecutive uppercase characters. For example, separate by-multiple_YAMLWords
will be split into separate
, by
, multiple
, YAML
and Words
.
partialWordSeparators should be used if this is not camel-cased or pascal-cased.
Implementation
static final Pattern wordSeparators = RegExp(r'((\s|-|_)+)|(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])');