mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-14 16:09:31 +01:00
18 lines
365 B
Dart
18 lines
365 B
Dart
//@dart=2.12
|
|
|
|
extension BeautifyStringExtension on String {
|
|
String get beautified {
|
|
var beautifiedStr = '';
|
|
for (var i = 0; i < length; i++) {
|
|
beautifiedStr += substring(i, i + 1);
|
|
if (i % 4 == 3) {
|
|
beautifiedStr += ' ';
|
|
}
|
|
if (i % 16 == 15) {
|
|
beautifiedStr += '\n';
|
|
}
|
|
}
|
|
return beautifiedStr;
|
|
}
|
|
}
|