stringCollapser
Version 1.0.0.0 (1.46 KB) by
Avinash Rude
Collapses a long comma separated string using a counter for repeated sub-strings
Example 1-
Input string = 'abc,abc,abc,dcf,dcf,ef'.
output string ='3abc,2dcf,1ef'
Example 2-
Input string = 'xyzr,abdc,abdc,haha,haha'.
output string ='1xyzr,2abdc,2haha'
Explanation:
This function collapses a comma separated long string, containing sub-strings, into a possibly smaller string by replacing repeated sub-strings by counts of repetitions of substrings.
Cite As
Avinash Rude (2024). stringCollapser (https://www.mathworks.com/matlabcentral/fileexchange/26616-stringcollapser), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2009a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on String Parsing in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |