Skip to main content

New answers tagged

3 votes

A simple C++ function converting the environment variables in main() to an unordered_map

Structured binding One point not raised by previous reviews: the code would be cleaner using a structured binding in your loop over the map contents. As well as making the key and value ...
Chris's user avatar
  • 6,126
3 votes

A simple method for compressing white space in text (Java) - Take II

Just some remarks. By providing a capacity: new StringBuilder(textLength) - here a bit extra room, you prevent internal array resizing inside StringBuilder. For ...
Joop Eggen's user avatar
  • 4,716

Top 50 recent answers are included