Retired

Limit string length - 1 (retired)

5,327 of 7,336hakt

Description:

The function must return the truncated version of the given string up to the given limit followed by "..." if the result is shorter than the original. Return the same string if nothing was truncated.

Example:

solution('Testing String', 3) --> 'Tes...'
solution('Testing String', 8) --> 'Testing ...'
solution('Test', 8)           --> 'Test'
Fundamentals

More By Author:

Check out these other kata created by hakt

Stats:

CreatedAug 12, 2013
Warriors Trained9287
Total Skips633
Total Code Submissions28948
Total Times Completed7336
JavaScript Completions5327
C# Completions311
Python Completions1437
Ruby Completions86
Rust Completions95
Total Stars30
% of votes with a positive feedback rating90% of 789
Total "Very Satisfied" Votes660
Total "Somewhat Satisfied" Votes104
Total "Not Satisfied" Votes25
Ad
Contributors
  • hakt Avatar
  • kazk Avatar
  • Souzooka Avatar
  • albertogcmr Avatar
  • user8436785 Avatar
  • ejini战η₯ž Avatar
  • Pyzyryab Avatar
Ad