mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-10-24 06:24:36 +00:00
8 lines
229 B
Dart
8 lines
229 B
Dart
|
|
extension GoogleFontsParser on String {
|
||
|
|
String parseFontFamilyName() {
|
||
|
|
final camelCase = RegExp('(?<=[a-z])[A-Z]');
|
||
|
|
return replaceAll('_regular', '')
|
||
|
|
.replaceAllMapped(camelCase, (m) => ' ${m.group(0)}');
|
||
|
|
}
|
||
|
|
}
|