Showing posts with label Quick Challenge; C#. Show all posts
Showing posts with label Quick Challenge; C#. Show all posts

Tuesday, May 21, 2013

Quick challenge #2: how to truncate a string in C# and keep word boundaries (do not split a word in two)

[Q] How to truncate a string in C# with more than 10 characters and keep word boundaries (do not split a word in two)?

[Examples] "Good morning test." -> "Good morni..." (wrong), "Good morning..." (correct)

Friday, May 10, 2013