Skip to content

Instantly share code, notes, and snippets.

@ThomasLocke
Created June 30, 2015 06:39
Show Gist options
  • Save ThomasLocke/e8e54c5ccff00102c042 to your computer and use it in GitHub Desktop.
Save ThomasLocke/e8e54c5ccff00102c042 to your computer and use it in GitHub Desktop.
En lille Dart sniplet
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