Skip to content

Instantly share code, notes, and snippets.

@ha-yi
Created June 9, 2020 04:16
Show Gist options
  • Save ha-yi/abdc6e95e793d22a06c687c2d23d602f to your computer and use it in GitHub Desktop.
Save ha-yi/abdc6e95e793d22a06c687c2d23d602f to your computer and use it in GitHub Desktop.
extension StringExt on String {
operator -(String another) {
return this.replaceAll(another, "");
}
}
void main() {
print("Hello World" - "World");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment