0

Could anyone please let me know what is the best way to concat string in scala? We have +, concat() etc. Which one gives better performance? Thanks!

2
  • 3
    + is just an alias for concat - Anyways, if you are going to contact only two that is fine, if you need to contact many and you know all of them then better use a string interpolator. Otherwise use a StringBuilder Commented Jan 13, 2022 at 16:05
  • Does this answer your question? Efficient string concatenation in Scala Commented Jan 14, 2022 at 8:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.