Created
June 30, 2015 06:39
-
-
Save ThomasLocke/e8e54c5ccff00102c042 to your computer and use it in GitHub Desktop.
En lille Dart sniplet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'dart:io'; | |
main(Args args) { | |
print(UTF8.decode(new File(args[0]).readAsBytesSync()) | |
.split('AND') | |
.map((s) => s.trim()) | |
.toList() | |
.join(' AND\n')); | |
} | |
/// Brug: | |
/// dart sniplet.dart dinfil.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment