This commit is contained in:
Alessandro Autiero
2025-03-23 20:26:13 +01:00
parent 9a000db3b7
commit 5d8f6bf0fa
16 changed files with 205 additions and 117 deletions

View File

@@ -0,0 +1,24 @@
import 'dart:convert';
import 'dart:io';
extension ProcessExtension on Process {
Stream<String> get stdOutput => this.stdout.expand((event) => utf8.decode(event, allowMalformed: true).split("\n"));
Stream<String> get stdError => this.stderr.expand((event) => utf8.decode(event, allowMalformed: true).split("\n"));
}
extension StringExtension on String {
bool get isBlankOrEmpty {
if(isEmpty) {
return true;
}
for(var char in this.split("")) {
if(char != " ") {
return false;
}
}
return true;
}
}