2 votes

Truncating/abbreviating strings in the middle with an ellipsis (…) (or other) separators with a fixed character limit

Thanks to Peter Csala for providing you an example on how to convert your code into using Span<T>, and I think his answer covered that. I just want to add ...
iSR5's user avatar
  • 5,248
2 votes
Accepted

Truncating/abbreviating strings in the middle with an ellipsis (…) (or other) separators with a fixed character limit

Let me present you an alternative version of your TruncateInMiddle which utilizes ReadOnlySpans. The core logic can be rewritten ...
Peter Csala's user avatar
  • 9,000
1 vote
Accepted

How to manage array of states effectively?

You can refactor that component into a main component, and each list will have its own component. Then you can reuse the list component multiple times: ...
Ooker's user avatar
  • 131
1 vote

What command line options style is the best for command similar to `scp`?

Maybe a different - ^ @ = separator than : is better? I take - dash to be the most innocuous of those. Remember that double or triple dash could be used, but also ...
J_H's user avatar
  • 25k
1 vote

Virtual scroller Vue component

General review points The code is quite readable as indentation is consistent and long lines are broken up. Most of it uses functional techniques to iterate through arrays, and it makes good use of ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
1 vote
Accepted

Virtual scroller Vue component

Found the problem - the filter: blur() rule was causing the issue, when I added it to the cards in the virtual list. And the Webkit doesn't use hardware ...
AlekseyHoffman's user avatar
1 vote
Accepted

Clock time validation app, cognitive exercise, minimal viable product

Thank you for the obvious effort put into readability. isort Your imports are nice enough as is. But you're working too hard. Run "$ isort *.py" and be done with it, don't give it a second ...
J_H's user avatar
  • 25k

Only top scored, non community-wiki answers of a minimum length are eligible