I'm writing a function which will be used to limit too long strings. I want to avoid duplicated code so I thought that putting almost whole function "logic" into return expression will be better than checking condition in every switch's case. But let's see code:I'm writing a function which will be used to li