Covering some basic topics I haven't seen elsewhere on Cody.

Given a string with extra spaces in front and/or in back, return a 'centered' version of the string (e.g.: ' MATLAB' -> ' MATLAB ')

Solution Stats

405 Solutions

210 Solvers

Last Solution submitted on May 25, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers210

Suggested Problems

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!