| about | help | code help+videos | done | prefs |
An online system limits user entries to n characters. Given a user entry, return it unchanged if its length is less than or equal to n but if it is longer then only return the first 19 characters and put an "*" on the end to show it has been shortened. strLim("0123456789", 4) → "012*" strLim("0123456789", 9) → "01234567*" strLim("0123456789", 10) → "0123456789" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 125
Copyright Nick Parlante 2017 - privacy