image thumbnail

Reverse Token Order

version (1.6 KB) by Siddharth Shankar
Reverse the order of words in a string.


Updated 01 Sep 2016

View License

This function reverses the order of words in a string. This function is not to be confused with FLIPLR which flips the left-right order of characters in a string.
For example:

reverseTokenOrder('Accelerating the pace of engineering and science')

ans =

science and engineering of pace the Accelerating

Cite As

Siddharth Shankar (2022). Reverse Token Order (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!