Retired
Unofficial FCC Challenge -- Basic Algorithm Scripting -- Truncate a String (retired)
12zcassini
Description:
Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a ...
ending.
Note that inserting the three dots to the end will add to the string length.
However, if the given maximum string s
length n
is less than or equal to 3, then the addition of the three dots does not add to the string length in determining the truncated string.
Remember to use Read-Search-Ask if you get stuck. Write your own code.
Algorithms
Similar Kata:
Stats:
Created | Apr 6, 2017 |
Warriors Trained | 47 |
Total Skips | 0 |
Total Code Submissions | 15 |
Total Times Completed | 12 |
Clojure Completions | 12 |
Total Stars | 0 |
% of votes with a positive feedback rating | 38% of 8 |
Total "Very Satisfied" Votes | 2 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 8 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |