Skip to main content

All Questions

2 votes
4 answers
3k views

What is the optimal way to perform 5000 unique string replace functions in terms of performance?

Restructuring some code, and the way I built it up over time has portions that look something like this: s.replace("ABW"," Aruba "); s.replace("AFG"," Afghanistan "); s.replace("AGO"," Angola "); s....
Anon's user avatar
  • 3,633