mirror of
https://github.com/wownero/cyberwow.git
synced 2026-12-06 07:03:57 +01:00
more regexp foo XD
This commit is contained in:
@@ -26,8 +26,10 @@ import 'config.dart' as config;
|
||||
String pretty(dynamic x) {
|
||||
final JsonEncoder encoder = JsonEncoder.withIndent(' ');
|
||||
return encoder.convert(x)
|
||||
.replaceAll(RegExp(r'["\[\]{},]'), '')
|
||||
.replaceAll('\n ', '\n');
|
||||
.replaceAll(RegExp(r'^{'), '\n')
|
||||
.replaceAll(RegExp(r'["\[\],{}]'), '')
|
||||
.replaceAll('\n ', '\n')
|
||||
;
|
||||
}
|
||||
|
||||
String trimHash(String x) => x.substring(0, config.hashLength) + ' ...';
|
||||
|
||||
Reference in New Issue
Block a user