image thumbnail

LCSSubStr-a function that return two string's largest common part

version 1.0.0.0 (1.5 KB) by Zhiping XU
a function that return two string's largest common part

490 Downloads

Updated 05 Apr 2010

View License

a function that return two string's largest common part

% Usage:
% [ret]=LCSubstr(s,t)
% s: input string 1
% t: input string 2
% ret: Largest Common String
% z: Largest Common String Length
% L : Compare matrix
% Example:
% >>a='This is very common string';
% >>b='string is very common';
% >>[ret]=LCSubstr(a,b)
% ret =
%
% very common

Cite As

Zhiping XU (2022). LCSSubStr-a function that return two string's largest common part (https://www.mathworks.com/matlabcentral/fileexchange/27173-lcssubstr-a-function-that-return-two-string-s-largest-common-part), MATLAB Central File Exchange. Retrieved .

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

Inspired: String subsequence tools

Community Treasure Hunt

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

Start Hunting!