mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-26 08:02:34 +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;
|
|
}
|
|
}
|