Problem 407. Back to basics 17 - white space
Solution Stats
Problem Comments
Solution Comments
-
3 Comments
Harish Maradana
on 2 Aug 2014
strtrim not working pls help me
Informaton
on 8 Nov 2017
Three years late here, but strtrim removes both leading and trailing white spaces. The test here is for the trailing scenario only.
David Verrelli
on 25 Dec 2017
Three and a bit years late too, but there may be a bigger problem with strtrim here, which is that apparently strtrim does not remove "null characters" (whether leading or trailing). This wasn't specifically required by the problem statement, but judging by test 3 it is needed here, and thus it seems that strtrim is especially unsuitable for test 3 (cf. Solution 1393480).
Problem Recent Solvers267
Suggested Problems
-
14092 Solvers
-
Reverse the elements of an array
822 Solvers
-
408 Solvers
-
414 Solvers
-
382 Solvers
More from this Author39
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!