Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mkString_ that just takes separator string #2663

Closed
matthughes opened this issue Dec 5, 2018 · 5 comments
Closed

Add mkString_ that just takes separator string #2663

matthughes opened this issue Dec 5, 2018 · 5 comments

Comments

@matthughes
Copy link
Contributor

Cats provides a Show-compatible version of mkString but it requires all three parameters: prefix, separator, suffix. The std library also provides a mkString that just takes a separator string; this is what I use 90% of the time.

Can we add this? I'd be happy to PR.

@calvinbrown085
Copy link
Contributor

Hi @matthughes did you end up working on this?

@matthughes
Copy link
Contributor Author

@calvinbrown085 I have not. I wanted to see if there was interest before doing the PR as it's pretty simple. Really just adding a new method that delegates to the form:

def _mkString(separator: String): String = 
  _mkString("", separator, "")

@kailuowang
Copy link
Contributor

@calvinbrown085 I think this would be a good addition. And it's rather simple, the code you wrote and a doctest should do.

@calvinbrown085
Copy link
Contributor

@kailuowang @matthughes Feel free to take this one since you originally opened the issue :)

@dwijnand
Copy link
Contributor

dwijnand commented Feb 1, 2019

Fixed by #2709

@fthomas fthomas closed this as completed Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants