simc / dartx

Superpowers for Dart. Collection of useful static extension methods.
https://pub.dev/packages/dartx
Apache License 2.0
1.09k stars 87 forks source link

Fix #79 add removePrefix, removeSuffix, removeSurrounding #90

Closed mreichelt closed 4 years ago

mreichelt commented 4 years ago

This was fun to implement, and should close #79. One thing I was not sure yet how to handle this was: The parameters in prefix and suffix in removeSurrounding are named, but must be given - otherwise this will throw an exception. First I wanted to add the meta dependency in the pubspec to add @required, but then I thought that maybe with non-null support in Dart this will be handled later anyway. What do you think @leisim @passsy? 🙂

simc commented 4 years ago

@mreichelt Thanks a lot for this PR. I would leave the parameters for now.

mreichelt commented 4 years ago

Thanks - then this PR is ready to be merged ✅

passsy commented 4 years ago

Thanks for your contribution!