Retired

Unofficial FCC Challenge -- Basic Algorithm Scripting -- Truncate a String (retired)

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.

https://www.freecodecamp.com/challenges/truncate-a-string

Algorithms

Stats:

CreatedApr 6, 2017
Warriors Trained47
Total Skips0
Total Code Submissions15
Total Times Completed12
Clojure Completions12
Total Stars0
% of votes with a positive feedback rating38% of 8
Total "Very Satisfied" Votes2
Total "Somewhat Satisfied" Votes2
Total "Not Satisfied" Votes4
Total Rank Assessments8
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • zcassini Avatar
Ad